Closed Bug 631621 Opened 15 years ago Closed 7 years ago

Want API for attaching a console message to a JS exception

Categories

(Core :: XPConnect, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: zwol, Unassigned)

Details

In bug 631615 we discuss disabling CSS parser diagnostics for the matchesSelector/querySelectorAll/etc APIs because those throw JS exceptions when they fail, and people don't want to see the parser warning when the exception is caught. It would be better if we could take the parser's warning, pack it up in an nsIConsoleMessage, and attach it to the XPConnect context. When the JS exception was thrown, the message would get transferred from the context to the exception object; JS could pull it out if it wanted, or if the exception went uncaught, the last-chance handler could report it along with the usual uncaught-exception message. I am envisioning an API along the lines of the PyErr_Set* functions documented here: http://docs.python.org/c-api/exceptions.html See also bug 482137 and bug 630464.
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.