HomePhabricator Dev

Bug 1536556 - Replace new Error(Cr.ERROR) with new Component.Exception. r=mossop

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

Description

Bug 1536556 - Replace new Error(Cr.ERROR) with new Component.Exception. r=mossop

Passing Cr.ERROR to an Error constructor is incorrect since it just sets the
message of the error to the integer value of the Cr.ERROR. Cr.ERRORs need to be
used as the second argument to Component.Exception to correctly construct an
Exception object with its result property set to the Cr.ERROR value.

This was done automatically by an expansion of the new
mozilla/no-throw-cr-literal eslint rule that will be introduced in the next
commit.

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

Details

Provenance
KwanAuthored on

Commit No Longer Exists

This commit no longer exists in the repository.