Closed
Bug 433618
Opened 16 years ago
Closed 2 years ago
JS_GetPendingException doesn't return objects other than Error
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: taras.mozilla, Unassigned)
Details
Attachments
(1 file)
1.42 KB,
patch
|
Details | Diff | Splinter Review |
I was trying to throw custom objects instead of Error objects and noticed that JS_GetPendingException doesn't return those. Here is a session in a slightly modified js shell. js> throw new Error() JS_GetPendingException: 1 typein:1: js> throw new Object() JS_GetPendingException: 0 uncaught exception: [object Object] js> shaver says this might be a bad bug.
We explicitly clear the exception before calling the error reporter for uncaught exceptions, I suspect in case the reporter calls script: http://lxr.mozilla.org/mozilla/source/js/src/jsexn.c#1293 Set JSOPTION_DONT_REPORT_UNCAUGHT on the context if you don't want the conversion to error. (Whew!)
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Or not. We should SetPending/ClearPending around both flavours of error-reporter calling.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•2 years ago
|
Status: REOPENED → RESOLVED
Closed: 16 years ago → 2 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•