node/test/message/undefined_reference_in_new_context.out
Anna Henningsen b73e66e949
vm: never abort on caught syntax error
Keep track of C++ `TryCatch` state to avoid aborting when
an exception is thrown inside one, and re-throw in JS
to make sure the exception is being picked up a second time by
a second uncaught exception handler, if necessary.

Add a bit of a hack to `AppendExceptionLine` to avoid overriding
the line responsible for re-throwing the exception.

PR-URL: https://github.com/nodejs/node/pull/17394
Fixes: https://github.com/nodejs/node/issues/13258
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-05 23:49:36 +01:00

17 lines
497 B
Plaintext

before
evalmachine.<anonymous>:1
foo.bar = 5;
^
ReferenceError: foo is not defined
at evalmachine.<anonymous>:1:1
at Script.runInContext (vm.js:*)
at Script.runInNewContext (vm.js:*)
at Object.runInNewContext (vm.js:*)
at Object.<anonymous> (*test*message*undefined_reference_in_new_context.js:*)
at Module._compile (module.js:*)
at *..js (module.js:*)
at Module.load (module.js:*)
at tryModuleLoad (module.js:*:*)
at Function.Module._load (module.js:*:*)