Repository navigation
Make InternalErrors uncatchable by JS code - #1814
Merged
Merged
Conversation
Such errors indicate that the JS engine is in an unexpected state so it makes no sense (and is possibly dangerous) to let JS code catch and ignore them. Fixes: quickjs-ng#1813
saghul
approved these changes
Oct 8, 2026
ironpark
added a commit
to ironpark/qngg
that referenced
this pull request
Nov 30, 2026
QuickJS-NG v0.18.0 makes an InternalError uncatchable by JavaScript (quickjs-ng/quickjs#1814): such errors signal a broken engine state. A Go function returning an *Error named InternalError therefore now ends the call into JavaScript, which try/catch cannot stop. NewError says so, and the test expects it. None of the other API changes, such as the interrupt handler taking a context, touch the code QNGG uses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Such errors indicate that the JS engine is in an unexpected state so it makes no sense (and is possibly dangerous) to let JS code catch and ignore them.
Fixes: #1813