Python - Exception handling
Catching specific and general exceptions thrown in the execution of a section of code.
Catching specific and general exceptions thrown in the execution of a section of code.
try:
{{try_code}}
except {{specific_error}}:
{{specific_code}}
except Exception as e:
{{general_code}}
last update: