Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Q module fails to load if e.stack throws #796

Open
murrayju opened this issue Dec 9, 2016 · 0 comments
Open

Q module fails to load if e.stack throws #796

murrayju opened this issue Dec 9, 2016 · 0 comments

Comments

@murrayju
Copy link

murrayju commented Dec 9, 2016

The hasStacks logic at q.js#L86 could throw an Error, causing the module to fail to load. This can happen when something has overridden Error.prepareStackTrace() with a function that might throw. Although it looks like a property, e.stack will actually evaluate Error.prepareStackTrace() (and cache the result).

The solution is probably to surround e.stack in a try/catch.

A real example with more details can be found at jashkenas/coffeescript#4391.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant