Skip to content

Promise.onuncatched

David Fahlander edited this page Apr 3, 2014 · 4 revisions

Called if the promise wasnt catched.

Sample

var p = new Promise(function (resolve, reject) {
    reject("Failed!");
});
p.onuncatched = function (e) {
    alert ("No-one catched this error: " + e);
}

Result:

Since p.catch() wasn't called, the alert would be fired.

Clone this wiki locally