Closed Bug 1636590 Opened 4 years ago Closed 4 years ago

Provide an exception stack for uncaught promises rejections

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

No description provided.
Depends on: 1558786

This will improve error message information when the rejection value is not an erorr object.

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 ?

Blocks: 1634800

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

Blocks: jserror
No longer blocks: jserror
Blocks: jserror
No longer blocks: jserror

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

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.

Flags: needinfo?(nchevobbe)

(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?

Flags: needinfo?(nchevobbe)

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?

Severity: -- → N/A
Blocks: 1636691
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
Blocks: 1638533
Regressions: 1638549
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: