-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Q module fails to load if e.stack
throws
#796
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
hasStacks
logic at q.js#L86 could throw an Error, causing the module to fail to load. This can happen when something has overriddenError.prepareStackTrace()
with a function that might throw. Although it looks like a property,e.stack
will actually evaluateError.prepareStackTrace()
(and cache the result).The solution is probably to surround
e.stack
in atry/catch
.A real example with more details can be found at jashkenas/coffeescript#4391.
The text was updated successfully, but these errors were encountered: