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

Make sure that errors throw Error instead of string #92

Merged

Conversation

vlovich
Copy link
Contributor

@vlovich vlovich commented May 16, 2023

Conventionally, thrown exceptions are Error objects instead of strings so that they can capture the stack of where the exception was generated from.

What's Changing

Change Type

Indicate the type of change your pull request is:

  • patch
  • minor
  • major

I think it's a patch but it is technically a change in the kind of error thrown so could be minor/major? Not sure. I'd like to keep it a patch so if this isn't acceptable I can retrofit an option to change this behavior.

Release Notes

This release fixes how this library throws errors. Instead of throwing string it will throw an actual error. Implementations might need updating.

Conventionally, thrown exceptions are Error objects instead of strings
so that they can capture the stack of where the exception was generated
from.
@vlovich
Copy link
Contributor Author

vlovich commented May 16, 2023

This resolves #89

@hipstersmoothie
Copy link
Collaborator

Marking as major since this could break usage

@hipstersmoothie hipstersmoothie merged commit 7ae02f8 into domharrington:master May 16, 2023
@hipstersmoothie
Copy link
Collaborator

🚀 PR was released in v4.0.8 🚀

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

Successfully merging this pull request may close these issues.

2 participants