develooper Front page | perl.perl5.porters | Postings from May 2010

Re: more reliable exception handling

Thread Previous | Thread Next
From:
David Golden
Date:
May 5, 2010 08:26
Subject:
Re: more reliable exception handling
Message ID:
z2v5d4beb41005050825td5e961eal11dcbdcd8bababfb@mail.gmail.com
On Wed, May 5, 2010 at 11:17 AM, Zefram <zefram@fysh.org> wrote:
>>*nod* I suspect inlining this into perldelta for the final version of
>>the patch would make lots of sense.
>
> Not the full form of the list, I think.  It's unwieldy.  But a shorter
> version should be comprehensible.

On IRC, I asked Zefram if the following statement (more or less) were
now true and he agreed:

* After an eval block, $@ is guaranteed to hold either the first fatal
exception to occur within the block or the empty string if no fatal
exceptions occurred within the block.

This is in contrast to the older, buggy behavior that might result in
$@ containing an exception from exception handlers or from side
effects from exiting the block.  (I think I stated that correctly)

I found that to be a clearer description focusing on the impact of the
change rather than the mechanism of the change.

The other changes seem mostly to ensure consistent treatment of $@
regardless of whether it contains a string or an object.

-- David

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About