Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python exception

try:
    # raise a custom exception
    raise Exception("A custom exception")
except Exception as err:
    print(err)
finally:
    print('This execute no matter if an exception occurs or not')
Source by codefreelance.net #
 
PREVIOUS NEXT
Tagged: #python #exception
ADD COMMENT
Topic
Name
2+3 =