catching exceptions from an except: block
Steven D'Aprano
steve at REMOVEME.cybersource.com.au
Thu Mar 8 20:47:53 EST 2007
On Thu, 08 Mar 2007 16:19:27 -0800, Paul Rubin wrote:
> Steven D'Aprano <steve at REMOVEME.cybersource.com.au> writes:
>> I thought "raise" on its own was supposed to re-raise the previous
>> exception, but I've just tried it in the interactive interpreter and it
>> doesn't work for me.
>
> It means you can catch an exception, do stuff with it, and then pass
> it upward to earlier callers:
[snip code]
Are you saying it only works as advertised within the except clause of a
try...except block?
--
Steven D'Aprano
More information about the Python-list
mailing list