-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
When I debug the example below I see that wrap() swallows the exception even in the case that no rejection handlers are registered. This is not a good thing: consider that the function that throws here could be many libraries away and know nothing about Promises.
var testResult = (function () {
var p = new Promise(function(r) {
setTimeout(function() {
r.resolve();
}, 10);
});
p.then(function() {
throw new Error('blam');
});
return p;
})();
testResult.then(function(value) {
console.log("success");
}, function(error) {
console.error(error);
});
Metadata
Metadata
Assignees
Labels
No labels