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 propagateJS_FALSE
back into JSAPI, or useJS_ClearPendingException
to catch it. - To trigger a JSAPI error, use
JS_ReportError
and returnJS_FALSE
.
Note:
See TracTickets
for help on using tickets.