Closed Bug 1538764 Opened 9 months ago Closed 9 months ago

Enable ESLint rule no-throw-literal in gfx/

Categories

(Core :: Graphics, enhancement)

enhancement
Not set

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.

Result of running:
$ mach eslint -funix gfx/ | 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 ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f755066901eb
gfx/ automated ESLint no-throw-literal fixes. r=kats
https://hg.mozilla.org/integration/autoland/rev/a20d8267e39f
gfx/ manual ESLint no-throw-literal fixes. r=kats
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.