[Prev][Next][Index][Thread]

# Re: Exception handlers

- Date: Wed, 21 Feb 1996 10:18:11 PST
- From:
- Cc: MOO-Cows@parc.xerox.com
- In-reply-to: Tom Meyer's message of "Tue, 20 Feb 1996 21:19:37 PST" <199602210519.AAA06892@unnamed.cs.brown.edu>

    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:
    >   try
    >     <some code here>
    >   except
    >     <some exception>
    >   finally
    >     <Code to clean up in any case>
    >   endtry
    >
    > 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:

    	try
    	  try
    	    <some code here>
    	  except (...)
    	    <some handler>
    	  endtry
    	finally
    	  <Code to clean up in any case>
    	endtry

    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.

    	Pavel

References:

- Exception handlers

- From: Tom Meyer <twm@cs.brown.edu>

- Prev: Exception handlers
- Next: experience compiling lambdaMOO on AIX?
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index