_conditionally_ returning to point where exception was raised?

infidel saint.infidel at gmail.com
Wed Mar 16 14:34:37 EST 2005


There's no "Resume Next" in python.  Once you catch an exception, the
only way you can go is forward from that point.

So if B.CallingMethod catches an exception that was raised in
A.CalledMethod, all it could do is try calling A.CalledMethod again, it
can't jump back to the point where the exception was raised.  About the
best you could, I think, would be to break A.CalledMethod up into
smaller function and let B.CallingMethod call each one in sequence,
deciding whether or not to continue if an exception is raised in any of
them.




More information about the Python-list mailing list