You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
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 exceptionsThe text was updated successfully, but these errors were encountered: