Python Language Exceptions
Jump to navigation
Jump to search
Internal
Overview
try/except
is a language-level mechanism to handle errors (traceback) that may be caused by a section of the code.
To trigger an exception manually in the code use raise
.
To conditionally trigger an exception in the code, use assert
.