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

Re: more reliable exception handling

Thread Previous
From:
Rafael Garcia-Suarez
Date:
May 4, 2010 06:46
Subject:
Re: more reliable exception handling
Message ID:
n2wb77c1dce1005040645yfe584396k5e07f4f46edd4532@mail.gmail.com
On 4 May 2010 00:28, Zefram <zefram@fysh.org> wrote:
> Attached is a sequence of patches relating to die().  It fixes RT #74538,
> along with moving more fully away from the historical requirement for
> exceptions be no more than strings.  It also fixes the issue with $@
> clobbering, which I've previously mentioned as a scoping/exception
> problem.  An overall theme for the patches is that $@ is currently given
> too many jobs, some of them conflicting, so I've relieved it of some
> of them.
>
> There are some changes in Perl-visible behaviour here.  All the ones I
> know about are intentional.  No doubt someone will find some code that
> gets broken by it.  Let the bun fight begin.
>
> Patches also available at git://lake.fysh.org/zefram/perl.git branch
> zefram/reliable_exception.

Thanks, merged into bleadperl. I'm happy to see more sanity in exception-land.

Note that I had to solve a few merge conflicts, due to Vincent's
recent patching in that area.

Also further adjustments were needed :
62705b21e05c097bbaecf3ca91f129dc5855ce77 : only a typo fix in embed.fnc
c919e87379678094951ae4130a71bdc1938ccde1 : a test now failing in Safe.
I am not convinced this test should absolutely pass. Basically, we
compile and return an anonymous subroutine in a Safe compartment. This
coderef, for security reasons, is then wrapped in a call to the same
compartment -- see wrap_code_ref() in Safe.pm. The subroutine die()s,
but no exception is re-thrown.

Thread Previous


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