Skip to content

Changed from throwing strings to throwing custom subtypes of Error. #9

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

Merged
merged 1 commit into from
Feb 8, 2017

Conversation

EposnowHQ
Copy link

Throwing strings for errors means you do not get stack traces for errors impossible. I know throwing strings was probably done for size reasons, but personally I consider it worth the extra size.

@infusion
Copy link
Collaborator

Thanks for the pull request! You're absolutely right about stack traces and the reason for this abstract error handling is the file size. But having this feature would be worth the additional bytes. However, I have to look into your PR more precisely, as fraction.js is dependency of a few projects and don't want to break tests there.

@cameron-martin
Copy link

Have you had time to have a look at this?

@kevinbarabash
Copy link

I opened #11 without checking the open PRs. I was going to submit a PR that just wrapped each of the strings with new Error(). This is a much better solution, I hope it gets merged.

@infusion infusion merged commit 8923510 into rawify:master Feb 8, 2017
@infusion
Copy link
Collaborator

infusion commented Feb 8, 2017

Sorry for my late response on this, I finally merged it.

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.

4 participants