-
Notifications
You must be signed in to change notification settings - Fork 942
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
Can't catch exceptions when I upgrade version from 2023-12-09 to 2024-01-13 #232
Comments
run same code on 2023-12-09 version output
|
Reproducible on linux, but only when using eval with JS_EVAL_TYPE_MODULE, e.g. JS_EVAL_TYPE_GLOBAL works as expected |
ah, since module eval now support top-level await (see https://bellard.org/quickjs/Changelog) evalling a module actually returns a Promise.. my bet is that Promise will resolve to an error if code throws error.... -- edit -- confirmed, eval_module returns a promise which is rejected to the error thrown in code.. |
So the CLI(qjs) should be updated too. See #363 (comment) |
see bellard/quickjs#232 fix bug in eval_buf: bellard/quickjs#379
* fix uncaught exception return success, see bellard/quickjs#232 * fix bug in eval_buf: bellard/quickjs#379 * cleanup test cases
output:
Running on an Android device, through jni calls, I did not make any changes to the source code
On the version 2023-12-09, running errors can be caught normally
The text was updated successfully, but these errors were encountered: