Created
August 5, 2020 06:13
-
-
Save esprehn/938dbd4271a2deb3fb30af8f03196ddc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<script> | |
function a() { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => reject(new Error('test')), 100); | |
}); | |
} | |
function b() { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => resolve(), 100); | |
}); | |
} | |
b().then(() => a()); | |
onunhandledrejection = (e) => { | |
console.log(e.reason.stack); | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment