MOO-cows Mailing List Archive

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

Re: [RFC] try ... finally ... entry enhancements?



I don't understand what you mean.

If you want to execute code that will run if the try statement doesn't 
raise an error or return?  That's simple, just make it the last try 
statement.

Finally statements are just pieces of code that are run nomatter what, 
though they can be snuck past with a timeout or kill_task(task_id()).  I 
don't know what you mean in making finally statements "smart".  What 
exactly are you trying to accomplish?  Could you please explain it?

Also, in a language statement, it's not neccessary to follow a strict LIST 
format.  I'm sure a more intuitive format could be found.

Phantom

On Thu, 10 Jul 1997, Richard Godard wrote:

> Hi,
> 
> Would it be a good idea and is it easily to change the try ... finally ...
> entry statement to something like:
> 
> try
>   <try statements>
> finally [LIST exit_info_variable]
>   <finally statements>
> endtry
> 
> exit_info_variable value could be
> {0}
> =>  <try statements> doesn't return nor raise an error
> 
> {1, <return value>}
> => <try statements> doesn't raise an error and return  <return value>
> 
> {<code>, <message>, <value>, <traceback>}
> => <try statements> raise <code>
> 
> Such tool would help to make smarters finally statements (IMHO) and would
> also such nifty things as nice traces in-db (right now I have @trace <eval
> code to be  traced> but I have no way to show the return/exit values :(
> 
> Comments/suggestions are more than welcome.
> 
> Thanks.
> 
> Richard/Janus
> 
> 
> 

Follow-Ups: References:
Home | Subject Index | Thread Index