You mean something like:
process.on("unhandledRejection", function(p, reason){
console.log('Uncaught error: ', reason); // this will get called
});
Promise.resolve().then(x => { throw "Hah"; });
And similarly in browsers?
In RSVP by the way, you'd do:
RSVP.on('error', function(reason) {
console.log("Uncaught Error", reason);
});
RSVPPromise.resolve().then(x => { throw "Hah"; });
Since you mentioned RSVP