MOO-cows Mailing List Archive
Re: reraise and other error-handling
Date: Fri, 2 Aug 1996 15:59:31 PDT
Content-Type: text/plain; charset="us-ascii"
At 04:11 PM 8/2/96 PDT, Adams, Charles wrote:
>I also noticed that a try..except..finally..endtry construct does not
>compile. It seems you can't mix the two kinds -- a "finally" statement
>can't be seen in a construct when "except" statements are also present. Was
>this omission accidental or deliberate?
this was deliberate, here's what Pavel said to save the trouble of him
having to answer again:
Tom Meyer writes:
> I've been playing a bit with the exception handlers in 1.8.0beta3, and
> don't understand why I can't do the following:
> <some code here>
> <some exception>
> <Code to clean up in any case>
> I can use either the EXCEPT or the FINALLY part in the try statement,
> but can't use both.
You can't do this because I didn't implement it that way and it would be
difficult to fix it now. Write something like that as follows:
<some code here>
<Code to clean up in any case>
I actually find this more readable, since it's more clear which of the EXCEPT
and FINALLY parts is wrapped more tightly around the main TRY body.
Subject Index |