Created
July 12, 2012 22:05
-
-
Save LeZuse/3101388 to your computer and use it in GitHub Desktop.
V8: stack trace
This file contains hidden or 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
| Error.stackTraceLimit = Infinity; | |
| // Called before getting the stack property | |
| Error.prepareStackTrace = function(e,s){ | |
| console.log(e,s); | |
| }; | |
| // "Error" object | |
| var a = {toString:function() | |
| { | |
| return 'Custom error'; | |
| }}; | |
| Error.captureStackTrace(a); | |
| console.log(a.stack); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment