-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Exceptions (and descendants) have stack: undefined #2402
Comments
@mistergreen-christopher Thanks for the issue. Can you open PR, please ? |
@mistergreen-christopher Based on the nodejs doc const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack` |
🎉 This issue has been resolved in version 7.34.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 7.35.0-beta.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 7.35.0-rc.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 7.36.0-rc.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 7.36.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Information
Currently, when throwing an Exception or descendant, the stack trace is undefined. Please see the below example and check the log response in the terminal (when running locally).
Example
Log output
Suggested fix
Add
super.captureStackTrace()
in the constructor of the Exception class:tsed/packages/specs/exceptions/src/core/Exception.ts
Line 40 in 83bc31d
Please see Error.captureStackTrace for more details.
Acceptance criteria
The text was updated successfully, but these errors were encountered: