# New Ticket Created by  Ilya Belikin 
# Please include the string:  [perl #64262]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=64262 >


Hi there,

example:

try{
    foo;
    CATCH { die 1 }
}


S04, L800:

A C<CATCH> block sees the lexical scope in which it was defined, but
its caller is the dynamic location that threw the exception.  That is,
the stack is not unwound until some exception handler chooses to
unwind it by "handling" the exception in question.  So logically,
if the C<CATCH> block throws its own exception, you would expect the
C<CATCH> block to catch its own exception recursively forever.  However,
a C<CATCH> must not behave that way, so we say that a C<CATCH> block
never attempts to handle any exception thrown within its own dynamic scope.
(Otherwise the C<die> in the previous paragraph would never work.)


Ilya

Reply via email to