Closed Bug 1741247 Opened 4 years ago Closed 4 years ago

IOUtils unknown errors do not report the nsresult error code

Categories

(Toolkit Graveyard :: OS.File, defect, P3)

Tracking

(firefox96 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: beth, Assigned: beth)

Details

Attachments

(1 file)

When IOUtils encounters an error that it has not yet mapped in IOUtils::RejectJSPromise, it will only include the error code in the message if the IOError was constructed without a message.

Ideally, we would like to include this error code so that we can then add more mapping of nsresult errors we encounter to DOMExceptions.

Presently, if IOUtils encounters an error that it does not know how to map to
a DOMException (via RejectJSPromise), it will only include the nsresult error
code if the IOError was constructed without a message. This hides the root
cause of errors.

Now we always include the error code when rejecting with an UnknownError.

Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ce199e98a0c5 Include nsresult error codes in errors IOUtils does not know how to map r=Gijs
Flags: needinfo?(brennie)
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/66bc77a38617 Include nsresult error codes in errors IOUtils does not know how to map r=Gijs
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Flags: needinfo?(brennie)
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: