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

Add a StructLike class that extends Error. #1

Conversation

markdoliner-doma
Copy link

I'm merging this change into the all_states_title_changes branch. For the full PR description see the PR for merging this change into Credit Karma's master branch.

Exception classes should extend this so that they derive from Error.

As mentioned in [the thrift-typescript GitHub issue](creditkarma/thrift-typescript#178), it's useful for exceptions to derive from Error so they have stack traces and because some frameworks expect it. The GitHub issue mentions graphql-js. Jest's `toThrow()` function would also benefit from this. See the related thrift-typescript PR for more details.

Possible remaining work:
- Add a test?
- Bump version number so end users can require the new version.
@markdoliner-doma markdoliner-doma merged commit 8ea3898 into all_states_title_changes Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants