quickjs-kt
quickjs-kt copied to clipboard
Issue with catch in promise.
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.
Added test case here: https://github.com/asoee/quickjs-kt/commit/c7270657289f3e84f26246b79f973d50061c9115 which does indeed fail.