Answers for "when to catch exceptions python"

3

python catch all exceptions

try:
    raise Exception("Oh no! An error happened!")
except Exception as err:
    print("An error was handled")
finally:
  	print("This runs either way.")
Posted by: Guest on March-20-2020

Code answers related to "when to catch exceptions python"

Python Answers by Framework

Browse Popular Code Answers by Language