-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: add --abort-on-uncaught-exception + vm note #17389
Conversation
The --abort-on-uncaught-exception flag is not compatible with error handling involving the vm module. This is because V8 treats exceptions thrown from a VM as unhandled, and cause the process to abort. This commit adds a note to work around the issue using process.setUncaughtExceptionCaptureCallback().
[`Error`]: errors.html#errors_class_error | ||
[`eval()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval | ||
[`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this documented yet? I cannot find it in the last nightly docs:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It landed this morning so will need another night to pass :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry.
Or wait. Maybe this should be an option on the |
@addaleax I proposed that in #13258 (comment), but didn't really receive any feedback in favor. If you're on board, I could go that route. If I were to implement it as an option, I'd probably just toggle the C++ flag when running the vm code, not take a user provided function. |
@cjihrig I was thinking an |
The
--abort-on-uncaught-exception
flag is not compatible with error handling involving thevm
module. This is because V8 treats exceptions thrown from a VM as unhandled, and cause the process to abort. This commit adds a note to work around the issue usingprocess.setUncaughtExceptionCaptureCallback()
.Fixes: #13258
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
doc