-
Notifications
You must be signed in to change notification settings - Fork 31.3k
src: CancelTerminateExecution before throwing errors #20146
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
Conversation
Terminating the execution of a script would create a pending exception, therefore we should cancel the termination *before* throwing a new exception, otherwise the attempt to create a custom error may fail.
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.
LGTM. Shame of the duplication.
@bnoordhuis Yeah, the CJS and ESM code could use some proper reuse there.. On a side note, maybe the ESM error would have been "Module evaluation timed out" or "Module evaluation was interrupted", but I doubt if that matters for end users |
Landed in 3eeb346, thanks |
Terminating the execution of a script would create a pending exception, therefore we should cancel the termination *before* throwing a new exception, otherwise the attempt to create a custom error may fail. PR-URL: #20146 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Terminating the execution of a script would create a pending exception, therefore we should cancel the termination *before* throwing a new exception, otherwise the attempt to create a custom error may fail. PR-URL: #20146 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Terminating the execution of a script would create a pending
exception, therefore we should cancel the termination
before throwing a new exception, otherwise the attempt to
create a custom error may fail.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes