Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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.")
 
PREVIOUS NEXT
Tagged: #python #catch #exceptions
ADD COMMENT
Topic
Name
3+4 =