12.3 The exceptions module

The exceptions module contains the following objects of type exception:

assertion, file, generic, interrupt, key, namespace, numerical, overflow, range, syntax, type, unit.

To raise an exception with one of these types, the raise function should be called:

The raise($e,s$) function raises the exception $e$, with error string $s$. $e$ should be an exception object; $s$ should be an error message string.