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 #28

Open
fcbond opened this issue Jul 9, 2022 · 0 comments
Open

Error handling #28

fcbond opened this issue Jul 9, 2022 · 0 comments

Comments

@fcbond
Copy link
Owner

fcbond commented Jul 9, 2022

Blanket exceptions hide the true problems.

I am printing the exception e (which is otherwise unused here), but ideally I should catch only exceptions that you expect and can handle.

Finally, it's good practice to only put the statements that can trigger the exception (generally just one line) inside the "try" block, so you don't mix up exceptions from different calls.

Thanks to @goodmami for the comment

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

No branches or pull requests

1 participant