Continuing after error

Georg Brandl g.brandl-nospam at gmx.net
Thu Sep 28 08:40:00 EDT 2006


Sheldon wrote:
> Hi,
> 
> Does anyone know if it is possible to resume the execution of a program
> after it stops at an error in the code and the error was corrected?

try:
     do something
except SomeException:
     correct the error

do something else

i.e. you handle the error in the except clause. If that's successful, your
program will continue normally.

Georg



More information about the Python-list mailing list