MemotivaException handling

How do you raise an exception?

Exception handling

Audio flashcard · 0:13

Nortren·

How do you raise an exception?

0:13

The raise statement raises an exception. You can raise an exception class, which Python instantiates with no arguments, or an instance you create explicitly. Inside an except clause, a bare raise re-raises the current exception, preserving the original traceback.
docs.python.org