The whole world is waiting for the unhandledrejection
and rejectionhandled
events. As of March 2016, Chrome is now the first to support it.
Example:
window.addEventListener('unhandledrejection', function(event) {
console.error('Unhandled rejection (promise: ', event.promise, ', reason: ', event.reason, ').');
});
Specification: HTML Living Standard
Mozilla Developer:
onrejectionhandled, onunhandledrejection