# [RFC] try ... finally ... entry enhancements?

Richard Godard (janus@cam.org)
Thu, 10 Jul 1997 22:06:13 -0400

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    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