On Jul 21, 6:38 am, "Mike Shaver" <
mike.sha...@...> wrote:
> On Mon, Jul 21, 2008 at 12:12 AM, AJG <
plus....@...> wrote:
> > In other words, what I'm seeing is that it's possible for
> > JS_ExecuteScript to return false even without a single call to the
> > error reporter callback.
>
> > Is that by design, or might I have a bug in my code somewhere?
>
> It can certainly happen due to a bug in your code, but if your
> JS_ExecuteScript is called with JS on the stack already (such as from
> a "load" method that you implement) then the error will manifest as an
> exception.
Ah, thank you. As a matter of fact, that was exactly the case :). The
problem happened inside nested load()-type functions.
Use JS_IsExceptionPending to see if that's the case, and
> then you can fetch the exception value via JS_GetPendingException or
> simply cause it to be reported to the error reporter via
> JS_ReportPendingException.
Ok, I'll take a look at these. Can the jsval set by
GetPendingException be stringized using something like
JS_ValueToString? Or do I have to treat it specially?
Thanks again.
Al.
_______________________________________________
dev-tech-js-engine mailing list
dev-tech-js-engine@...
https://lists.mozilla.org/listinfo/dev-tech-js-engine