mirror of
https://github.com/nodejs/node.git
synced 2025-05-13 12:50:44 +00:00

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>
17 lines
497 B
Plaintext
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:*:*)
|