Provide an exception stack for uncaught promises rejections
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: evilpie, Assigned: evilpie)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
Assignee | ||
Comment 1•3 years ago
|
||
This will improve error message information when the rejection value is not an erorr object.
Comment 2•3 years ago
|
||
could we use this bug to put a isPromise
or something similar on the nsIScriptError
so we can surface it in the console (like they do in Chrome), or should we open another bug for that ?
Assignee | ||
Comment 3•3 years ago
|
||
This makes is easier to actually assert that we have the right exception value.
We do have similar tests already, but most of them aren't based directly
on nsIScriptError.
Depends on D74479
Assignee | ||
Comment 4•3 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=dfc8cfa5706af094161e3675239027f4320303c2
Seems like there is at least on failure:
devtools/client/webconsole/test/browser/browser_webconsole_stubs_page_error.js | Uncaught exception - at chrome://mochitests/content/browser/devtools/client/webconsole/test/browser/stub-generator-helpers.js:218 - TypeError: can't access property 0, existingPacket.pageError.stacktrace is null
Assignee | ||
Comment 5•3 years ago
|
||
Assignee | ||
Comment 6•3 years ago
|
||
I can't figure out how to update stubs_page_error. ./mach test devtools/client/webconsole/test/browser/browser_webconsole_stubs_page_error.js --headless --setenv WEBCONSOLE_STUBS_UPDATE=true
didn't work.
Comment 7•3 years ago
|
||
(In reply to Tom Schuster [:evilpie] from comment #6)
I can't figure out how to update stubs_page_error.
./mach test devtools/client/webconsole/test/browser/browser_webconsole_stubs_page_error.js --headless --setenv WEBCONSOLE_STUBS_UPDATE=true
didn't work.
what do you mean by "didn't work"? Does the test fail, or does it fail to update the pageError.js stub file?
Comment 8•3 years ago
|
||
We should probably check that the stacktrace exists for those error messages. You can base it on top of https://phabricator.services.mozilla.com/D71288#change-Yv8sr879jfhE maybe?
Updated•3 years ago
|
Assignee | ||
Comment 9•3 years ago
|
||
Comment 10•3 years ago
|
||
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/42093ee9895d Provide an exception stack for uncaught promises rejections. r=baku https://hg.mozilla.org/integration/autoland/rev/03969758e9c9 Add a test suite for nsIScriptError. r=baku https://hg.mozilla.org/integration/autoland/rev/e64a08c79bc7 Expose isPromiseRejection on nsIScriptError. r=baku https://hg.mozilla.org/integration/autoland/rev/b2881b76bd3b Update devtools page stubs. r=nchevobbe
Comment 11•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/42093ee9895d
https://hg.mozilla.org/mozilla-central/rev/03969758e9c9
https://hg.mozilla.org/mozilla-central/rev/e64a08c79bc7
https://hg.mozilla.org/mozilla-central/rev/b2881b76bd3b
Updated•3 years ago
|
Updated•3 years ago
|
Description
•