porffor 0.50.15 → 0.50.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler/wrap.js +6 -8
- package/package.json +1 -1
- package/runner/index.js +1 -1
package/compiler/wrap.js
CHANGED
@@ -514,17 +514,15 @@ export default (source, module = undefined, customImports = {}, print = str => p
|
|
514
514
|
const exceptionMode = Prefs.exceptionMode ?? 'stack';
|
515
515
|
if (exceptionMode === 'lut') {
|
516
516
|
const exceptId = e.getArg(exceptTag, 0);
|
517
|
-
const
|
518
|
-
|
519
|
-
const constructorName = exception.constructor;
|
517
|
+
const { constructor, message } = exceptions[exceptId];
|
520
518
|
|
521
519
|
// no constructor, just throw message
|
522
|
-
if (!
|
520
|
+
if (!constructor) throw message;
|
523
521
|
|
524
|
-
const err = new Error(
|
525
|
-
err.name =
|
526
|
-
err.stack = `${
|
527
|
-
|
522
|
+
const err = new Error(message);
|
523
|
+
err.name = constructor;
|
524
|
+
err.stack = `${constructor}: ${message}`;
|
525
|
+
return err;
|
528
526
|
}
|
529
527
|
|
530
528
|
const value = e.getArg(exceptTag, 0);
|
package/package.json
CHANGED