HomePhabricator Dev

Bug 1536556 - Extend no-throw-cr-literal ESLint rule to forbid and fix `throw…

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Bug 1536556 - Extend no-throw-cr-literal ESLint rule to forbid and fix throw new Error(Cr.ERROR);. r=Standard8

Code should be using throw Components.Exception("", Cr.ERROR); instead,
since new Error() just converts the int value of the Cr.ERROR into a string,
whereas Exception constructs an Exception object with the result property set
to the Cr.ERROR value, so other code can identify it.

Differential Revision: https://phabricator.services.mozilla.com/D28074

Details

Provenance
KwanAuthored on

Commit No Longer Exists

This commit no longer exists in the repository.