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

Extend the Error object with metadata #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Crisfole
Copy link

The primary reason you'd want this is to allow catching the svg-parser errors with metadata attached.
In my particular case I don't want my end users shown the message (I carefully catch and rethrow errors with messages meant for end users if they do something irrecoverable).

I want to tell them they did something wrong and let me handle PRs/Issues if the svg-parser turns out to be at fault (highly unlikely).

The primary reason you'd want this is to allow catching the svg-parser errors with metadata attached. In my particular case I don't want my end users
shown the message, I want to tell them they did something wrong and let _me_ handle PRs/Issues if the svg-parser turns out to be at fault (highly unlikely).
Copy link

@Luxcium Luxcium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I included this code in the version of svg-parser I am using. This PR is really interesting thanks @Crisfole for sharing your thoughts.

@Crisfole
Copy link
Author

@Rich-Harris any chance we can merge this in? I'm happy to make changes, but I'd need your feedback.

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

Successfully merging this pull request may close these issues.

None yet

2 participants