Created
June 26, 2017 23:21
-
-
Save lykkin/ee9fc460060ffe7d7625b425d9ee49c2 to your computer and use it in GitHub Desktop.
long stacks
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
var oldNextTick = process.nextTick | |
process.nextTick = function(cb) { | |
var stack = (new Error()).stack | |
return oldNextTick.call(process, function() { | |
try { | |
return cb.apply(this, arguments) | |
} catch (e) { | |
e.stack = stack + e.stack | |
throw e | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment