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

Throw exception upon failure instead of arbitrary default value #21

Merged
merged 3 commits into from
Dec 4, 2022

Conversation

theofidry
Copy link
Owner

The reasoning is that depending of the context, one may want to apply a different arbitrary default value. It is easier to do that by wrapping the call in a try/catch catching a specific exception rather than getting the value directly (since you wouldn't know if you get the right value found, or the default one).

@theofidry theofidry merged commit f01ffc5 into main Dec 4, 2022
@theofidry theofidry deleted the bugfix/default branch December 4, 2022 17:17
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.

1 participant