Handle JS errors properly
|Reported by:||Philip Taylor||Owned by:||Yves|
|Priority:||Nice to Have||Milestone:||Backlog|
Description (last modified by )
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_FALSEback into JSAPI, or use
JS_ClearPendingExceptionto catch it.
- To trigger a JSAPI error, use