Last active
December 28, 2023 17:33
-
-
Save ryanmorr/cf44c1e80723b48f91fdb4b4a25ba121 to your computer and use it in GitHub Desktop.
Create a stacktrace
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
function stacktrace(error = new Error()) { | |
if (Error.captureStackTrace) { | |
Error.captureStackTrace(error, stacktrace); | |
return error.stack; | |
} | |
return error.stack; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment