Closed Bug 1536659 Opened 5 years ago Closed 5 years ago

Enable ESLint rule no-throw-literal in docshell/

Categories

(Core :: DOM: Navigation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: Kwan, Assigned: Kwan)

References

Details

Attachments

(2 files)

no-throw-literal helps ensure that when we do throw errors, they come with stack traces that help track down the source of the error.

Depends on: 1246594
See Also: 1246594

Result of running:
$ mach eslint -funix docshell/ | sed -Ee 's/:.+//' - | xargs sed -E
-e 's/throw ((["])[^"]+\2);/throw new Error(\1);/g' \ -e 's/throw ((["])[^"]+\2 + [^ ";]+);/throw new Error(\1);/g'
-e 's/throw (/throw new Error(/g' -i

Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/621f825b37e8
docshell/ automated ESLint no-throw-literal fixes. r=nika
https://hg.mozilla.org/integration/autoland/rev/35240b0ae4a5
docshell/ manual ESLint no-throw-literal fixes. r=nika
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: