First page Back Continue Last page Overview Graphics

Handling Exceptions

Errors occuring during execution of a script are

called exceptions. They are not necessarilly fatal

as they can be handled in programs.

Java and C++ use

„try … catch“ to handle exceptions and

„throw“ to generate them,

while Python uses

„try … except“ to handle exceptions and

„raise“ to generate them

Nearly every module in Python uses exceptions.

If you don't catch an exception the entire program will crash.