Skip to content
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

Exceptions do not include a stack trace #26

Closed
jtlapp opened this issue Dec 20, 2017 · 0 comments
Closed

Exceptions do not include a stack trace #26

jtlapp opened this issue Dec 20, 2017 · 0 comments

Comments

@jtlapp
Copy link

jtlapp commented Dec 20, 2017

Throwing a string doesn't include a stack trace in Node.js. This made it harder for me to figure out which code was going awry.

The solution is just to throw new Error() on that same string. I have a PR.

jtlapp added a commit to jtlapp/omggif that referenced this issue Dec 20, 2017
deanm added a commit that referenced this issue Dec 20, 2017
Throwing Error objects instead of raw strings is apparently the recommended
practice and should give better stack traces, etc.
@deanm deanm closed this as completed Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants