>>>>> "GB" == Graham Barr <[EMAIL PROTECTED]> writes:

GB> On Thu, Aug 10, 2000 at 04:34:50PM -0400, Chaim Frenkel wrote:
>> Nice.
>> 
>> The continue clause, I assume would re-raise an uncaught exception.
>> But, a big but. How does the 'else' clause indicate that the exception
>> was handled?

GB> By not rethrowing it. ie if it does not want to handle the
GB> error itself it just calls    die;

GB> Which will call PROPAGATE on the object in $@, just like perl5, then
GB> look back up the call-stack for the next eval { }

Hmm, we must be coming from different backgrounds.

I expect my exception handler to rethrow if not handled. I expect
the continue block to be run under both conditions, and be responsible
for ensuring consistancy.

Let's look at it from how the validity of the data (or object)

        # --> Invariant True
        eval {
                # --> Invariant True
                ....
                # --> Invariant True
        }
        else {
                # --> Invariant might be invalid
                ...
                # --> ????
        }
        continue {
                # --> ????
                ...
                # --> Invariant True
        }
        # --> Invariant True

What would you want at the exit point of the else or the entry point
of the continue? Is the job of the continue to restore the invariant
or is it the job of the else clause.

<chaim>
-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to