At 04:31 PM 8/23/00 -0400, Chaim Frenkel wrote:
> >>>>> "TO" == Tony Olekshy <[EMAIL PROTECTED]> writes:
>
> >> The unwind logic would treat a scope with no exception set _as if_
> >> each call were wrapped in at try block.
>
>TO> I don't think so.  If no exception is in scope Perl should continue
>TO> to generate and propagate exceptions (die and $@) as it does now,
>TO> so we don't break tradition.
>
>No, that should be the difference between die and throw. Die is
>immediately fatal. (i.e. current semantics) throw is new and does
>the magic.
>
>We get no breakage that way.

Yes, we get breakage; the user expects die to be trapped by eval.  Users of 
Error.pm also expect it to be trapped by catch.  I do not think we should 
maintain die/eval as a separate mechanism from try/catch; I think they 
should be synonymous for interoperation (so users aren't forced to migrate 
an entire application from one method to the other just because one module 
uses the other method).  This means that die can be trapped by catch, and 
that throw can be trapped by eval.
--
Peter Scott
Pacific Systems Design Technologies

Reply via email to