You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
new Promise((resolve, reject) => {
console.log('Initial');
resolve();
})
.then(() => {
throw new Error('Something failed');
console.log('Do this');
})
.catch(() => {
console.error('Do that');
})
.then(() => {
console.log('Do this, no matter what happened before');
});
the only output I got was Initial
it did took me sometime to discover that the statement console.error('Do that');
was the origin because of no support, but qjs did not raise any error.
if console.error is used in the main script qjs correctly stops at TypeError: not a function
at (promises.js:43)
The same happens with "use strict"
and a variable is set without declaration in the promise.
My feeling is that the error is caught but for some reason qjs is not able to abort nor to signal.
thank you beforehand.
Paolo
The text was updated successfully, but these errors were encountered:
I'm quite new to quickjs, while testing (QuickJS version 2021-03-27) I took the following piece of code from MDN
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises
the only output I got was
Initial
it did took me sometime to discover that the statement
console.error('Do that');
was the origin because of no support, but qjs did not raise any error.
if console.error is used in the main script qjs correctly stops at
TypeError: not a function
at (promises.js:43)
The same happens with "use strict"
and a variable is set without declaration in the promise.
My feeling is that the error is caught but for some reason qjs is not able to abort nor to signal.
thank you beforehand.
Paolo
The text was updated successfully, but these errors were encountered: