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

[Python] Try/except #5

Open
matiboy opened this issue Mar 22, 2017 · 1 comment
Open

[Python] Try/except #5

matiboy opened this issue Mar 22, 2017 · 1 comment

Comments

@matiboy
Copy link

matiboy commented Mar 22, 2017

Explain why your try/finally statement in database.py does not serve the purpose of catching exceptions and edit the code to handle expected exceptions.

Explain why it is bad practice to use except: without specifying the catchable exceptions

@ai550
Copy link

ai550 commented Mar 24, 2017

The reason I didn't catch exceptions in my try/finally statement is that I get everything right from 1st try and have an optimistic view on life.
Ok, jokes aside. I seriously can't recall how I missed that part. I guess I should just fix that.

Using except without specifying its type may generally cause ambiguity during debugging, where developer's expectations of one error are substituted with another.

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

2 participants