4 ms·
This is what I mean: doSomething(function (err) { doSomethingElse(function (err) { doYetAnotherThing(function (err) { throw new Error(
by nolanl 11y ago
This is what I mean:
doSomething(function (err) {
doSomethingElse(function (err) {
doYetAnotherThing(function (err) {
throw new Error(
"I don't bubble up to the top of the stack, " +
"because there is no stack!");
});
});
});
BTW a great trick is to tick the little "Async" box in the Chrome Dev Tools, so you can get a full stacktrace showing exactly where you came from. It works for both callbacks and promises: http://www.html5rocks.com/en/tutorials/developertools/async-call-stack/ http://www.html5rocks.com/en/tutorials/developertools/async-...