This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
new $q(executor)
does not catch exceptions #11472
Closed
Description
The following code prints UErr
.
try{
$q(function (res, rej) {
throw new Error('Wrong.');
}).then(function () { $log.info('OK?');
}).catch(function (e) { $log.info('Err', e);
});
} catch (e) { $log.info('UErr'); }
I'm not sure I understand the ES6 specs but in BlueBird (new Promise(executor)
) and in Q (new Q.Promise(executor)
) this prints Err [Error: Wrong.]
.