Skip to content

Instantly share code, notes, and snippets.

@lance
Last active November 15, 2016 21:40
Show Gist options
  • Save lance/c29af1f40fb8242a5ebc23225a467999 to your computer and use it in GitHub Desktop.
Save lance/c29af1f40fb8242a5ebc23225a467999 to your computer and use it in GitHub Desktop.
// Not super helpful
> Error: Surprise!
at Timeout.foobar [as _onTimeout] (repl:2:7)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
function foo () {
setTimeout(bar, 10);
}
function bar () {
setTimeout(foobar, 50);
}
function foobar () {
throw new Error('Surprise!');
}
foo();
process.on('uncaughtException', (e) => process._rawDebug(e.stack));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment