4 ms·
Yes, but this has a natural analogue in promise land: function startTask() { const promise = doTask(); promise.catch((e) => { if (e ins
by rictic 9y ago
Yes, but this has a natural analogue in promise land:
function startTask() {
const promise = doTask();
promise.catch((e) => {
if (e instanceof SpecificErrorType) {
handler(e);
} else {
throw e;
}
});
}
- codedokode 9y agoThe difference is the default behaviour: whether errors are fatal or whether they are ignored by default.