quickjs-kt icon indicating copy to clipboard operation
quickjs-kt copied to clipboard

Issue with catch in promise.

Open asoee opened this issue 1 year ago • 1 comments

This js code throws an exception, which i don't think it should:

                async function fetch() {
                    throw Error("bad thing happened");
                };
                await fetch().catch((e) => {});
                'Caught';

The exception is: com.dokar.quickjs.QuickJsException: Error: bad thing happened It is very similar to the other async tests, except that the async function is defined in javascript.

asoee avatar Nov 16 '24 22:11 asoee

Added test case here: https://github.com/asoee/quickjs-kt/commit/c7270657289f3e84f26246b79f973d50061c9115 which does indeed fail.

asoee avatar Nov 18 '24 11:11 asoee