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

Improve error handling #59

Open
daanboer opened this issue Mar 28, 2023 · 0 comments
Open

Improve error handling #59

daanboer opened this issue Mar 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@daanboer
Copy link
Contributor

daanboer commented Mar 28, 2023

The current method of handling errors is by throwing and catching exceptions. However it is easy to forget, and cumbersome, to try-catch everywhere necessary. Moreover, Typescript can't help because there is no way to signal that a function might throw. Error handling can be much improved by using a library such as true-myth, which calls for explicit handling of errors. This will squash any surprise bugs at runtime due to uncaught exceptions, and it will improve the developer experience as Typescript will signal the developer that a function might error and force them to handle it correctly.

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

No branches or pull requests

1 participant