Opened 13 years ago

Last modified 3 years ago

#742 assigned task

Handle JS errors properly — at Initial Version

Reported by: Philip Taylor Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Core engine Keywords:
Cc: Patch:

Description

Our current handling of SpiderMonkey errors is all broken: mostly we assume they don't happen, and if they do we report an error but don't propagate the exception. I've not noticed this being a significant problem in practice, but it's not nice.

I believe the way it's meant to work is (as here):

  • If a JSAPI function returns JS_FALSE, it has reported an error and thrown an exception; either propagate JS_FALSE back into JSAPI, or use JS_ClearPendingException to catch it.
  • To trigger a JSAPI error, use JS_ReportError and return JS_FALSE.

Change History (0)

Note: See TracTickets for help on using tickets.