mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 11:37:43 -10:00
loadSubScript throws a string, without any stack/location. Consider all string exceptions as coming from loadSubScript and re-throw a real error object, coming with the stack of the require call. Also handle wrong require path with a more explicit error message. Differential Revision: https://phabricator.services.mozilla.com/D14139
9 lines
135 B
JavaScript
9 lines
135 B
JavaScript
"use strict";
|
|
|
|
function throwingMethod() {
|
|
// eslint-disable-next-line no-throw-literal
|
|
throw "my-exception";
|
|
}
|
|
|
|
throwingMethod();
|