Closed Bug 1538766 Opened 5 months ago Closed 5 months ago

Enable ESLint rule no-throw-literal in mobile/

Categories

(Firefox for Android :: General, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
Firefox 68
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 mobile/ | 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

Thanks petru!

Green try, with one known intermittent (bug 1526729):
https://treeherder.mozilla.org/#/jobs?repo=try&revision=2e920d55f09cb02ed3cb5ef36f1b8bb27a2498f5

Sheriffs, this is for both this and bug 1538764.
If any later child revisions from other bugs show up in the stack by the time you get to this you don't need to worry about them, only push up to D24732.

Keywords: checkin-needed

Pushed by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2596c01bd847
mobile/ automated ESLint no-throw-literal fixes. r=petru
https://hg.mozilla.org/integration/autoland/rev/1b85204856e2
mobile/ manual ESLint no-throw-literal fixes. r=petru

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.