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

[FEATURE] - Descriptive exceptions. #56

Open
Johannestegner opened this issue Jun 3, 2023 · 0 comments
Open

[FEATURE] - Descriptive exceptions. #56

Johannestegner opened this issue Jun 3, 2023 · 0 comments

Comments

@Johannestegner
Copy link
Member

The current implementations (might be exceptions! :) ) have quite generic error messages. We should go through the cases where we throw errors and create a list of actual error messages which could be used over the different solutions.

I'm alright with it differing slightly over the various packages, but the more "standard" the better.

Example:
Error thrown on parse returns (in some packages at the least) "Invalid personnummer".

This doesn't say much.

If it threw a PersonnummerException with the message "Month out of range", it would be a lot easier to see what went wrong.

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

No branches or pull requests

1 participant