Closed
Bug 755553
Opened 13 years ago
Closed 7 years ago
Some exceptions in callbacks do not display in console
Categories
(DevTools :: Console, defect, P2)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: ianbicking, Unassigned)
Details
While I can't determine quite *why* some exceptions show up in the console and some do not, that does seem to happen.
Here is an example of an exception that does not display:
navigator.mozApps.getSelf().onsuccess = function () {
console.log('Started onsuccess');
throw 'failure';
};
That will show the console message, but no exception. This example is posted at http://app1.ianbicking.org/example-error.html if you run tryError4() in the web console (tryError 1-3 all work).
While mozApps callback is one example of an error being swallowed, I know I've encountered others, though I haven't kept track well enough to determine what exactly causes this.
Comment 1•13 years ago
|
||
I know we do not show in some cases exceptions that happen in synthesized DOM events. They don't even show in the error console.
Does this error show in the Error Console for you? If it does, then it's most-likely an issue with the nsIScriptError that is sent - it might lack the inner/outer window IDs.
For errors to display in the Web Console they need to have the originating inner and outer window IDs.
Reporter | ||
Comment 2•13 years ago
|
||
I've opened Bug 755769 for mozApps in particular. I'm not sure if Web Console can do any more in this case?
Comment 3•13 years ago
|
||
(In reply to Ian Bicking (:ianb) from comment #2)
> I've opened Bug 755769 for mozApps in particular. I'm not sure if Web
> Console can do any more in this case?
Unfortunately, not really. We need those errors surfaced somehow, then we need those errors to have the inner and outer window ID.
Thanks for your reports!
Reporter | ||
Comment 4•13 years ago
|
||
Would it be possible to display errors that lacked this window ID context? I.e., if one came through show it in the active window (even if perhaps it's not the right window). Certainly fixing these errors in Firefox is the "right" solution (and can still be pursued), but perhaps better to have noisy exceptions (and fix them to be less noisy) than silent exceptions.
I know there are exceptions that Firebug displays that the Web Console does not, though I've often moved on without determining the exact context (sorry).
Comment 5•13 years ago
|
||
(In reply to Ian Bicking (:ianb) from comment #4)
> Would it be possible to display errors that lacked this window ID context?
> I.e., if one came through show it in the active window (even if perhaps it's
> not the right window). Certainly fixing these errors in Firefox is the
> "right" solution (and can still be pursued), but perhaps better to have
> noisy exceptions (and fix them to be less noisy) than silent exceptions.
>
> I know there are exceptions that Firebug displays that the Web Console does
> not, though I've often moved on without determining the exact context
> (sorry).
We want to have a global Web Console, some day, that will be able to replace the existing Error Console. Unfortunately, until then it would be too noisy / too much heuristics to display some (or all) of the global errors.
Nonetheless, we are open to ideas and patches!
Reporter | ||
Comment 6•13 years ago
|
||
If I wanted to look into this, where in the tree would I start looking?
Comment 7•13 years ago
|
||
(In reply to Ian Bicking (:ianb) from comment #6)
> If I wanted to look into this, where in the tree would I start looking?
Web Console code lives in browser/devtools/webconsole. HUDService.jsm is the UI and HUDService-content.js is the "backend" with all the listeners. The Web Console is undergoing some important changes as part of bug 673148 (splitting out the listeners from HUDService.jsm into the content script).
For actual errors look into Gecko code - search with mxr for nsIScriptError, nsScriptError, nsIConsoleService, nsIConsoleMessage, etc.
Thanks!
Reporter | ||
Comment 8•13 years ago
|
||
Looking into the mozApps code a bit, I am not entirely sure if the problem is with that code or DOMRequest itself; if DOMRequest then many new APIs are likely to have this same problem (though right now the only other new APIs are B2G-specific, I think). It might also be that mozApps is not using DOMRequest properly.
Updated•12 years ago
|
Priority: -- → P2
Comment 9•7 years ago
|
||
Inactive for the past 5 years. mozApps are obsolete too I think. Closing for now. Trying to clean our backlog up a bit.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•