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

Error handling #27

Closed
hazeycode opened this issue May 21, 2023 · 0 comments · Fixed by #28
Closed

Error handling #27

hazeycode opened this issue May 21, 2023 · 0 comments · Fixed by #28

Comments

@hazeycode
Copy link
Contributor

hazeycode commented May 21, 2023

Currently assert is used to check that various things are valid. This is an incorrect use of assertions and makes this library unusable for any production code. Assertions should be used to check for programmer errors during development not normal runtime data errors.

In Dart, the proper way to handle normal runtime errors is by using Exceptions see https://dart.dev/language/error-handling

Exceptions in Dart are not ideal. It's better to use nullables or error unions. See discussion here: dart-lang/language#3094

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 a pull request may close this issue.

1 participant