Answers for "python get catch raise"

4

throw error python

raise Exception("Error")
Posted by: Guest on April-22-2021
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

Python Answers by Framework

Browse Popular Code Answers by Language