Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

the way we save the stack in errors defeats the stack #1521

Closed
gordonwoodhull opened this issue Mar 19, 2019 · 4 comments
Closed

the way we save the stack in errors defeats the stack #1521

gordonwoodhull opened this issue Mar 19, 2019 · 4 comments
Labels

Comments

@gordonwoodhull
Copy link
Contributor

I did this in bbee2c4:

this.stack = (new Error()).stack;

I presume it helped in some old browser, but now it replaces the usual stack with a stringy stack that doesn't work well in debuggers.

@gordonwoodhull
Copy link
Contributor Author

I'm not even seeing an error in the browser console in Firefox, so I wonder if throwing objects derived from Error is a good idea.

@gordonwoodhull
Copy link
Contributor Author

gordonwoodhull commented Mar 27, 2019

There are no try-catch blocks in the code at all, so for better or worse, removing the classes would only potentially affect clients of the library.

A brief search across repos on github did not reveal anyone using InvalidStateException but I guess the rest should be searched too... if that's the right approach. Would be preferable to fix the current derivation.

@kum-deepak
Copy link
Collaborator

It has already been updated. This issue can be closed.

@gordonwoodhull
Copy link
Contributor Author

fixed in #1548

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants