JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js"></script>
JavaScript
function timeout() {
return Promise.delay(5000);
}
timeout().then(function () {
throw new Error("Boo!");
}).then(function () {
console.log("Hello World");
}, function () {
console.log("In Error Handler");
}).then(function () {
console.log("This should have run");
}).catch(function () {
console.log("But this does instead");
});