Promise.resolve() .then(()=>{ log('onFulfilled#1 throws'); throw new Error('exceprion from onFulfilled#1') }) .catch((reason)=>{ log('onRejected#2 got reason:', reason); }); function log(...strings){ let node = document.createElement('div'); node.innerText = strings.join(' '); document.getElementById('log').appendChild(node); }