develooper Front page | perl.perl5.porters | Postings from March 2008

Re: local $@ has an unwanted side effect

Thread Previous | Thread Next
From:
Abigail
Date:
March 21, 2008 10:58
Subject:
Re: local $@ has an unwanted side effect
Message ID:
20080321175833.GD7226@abigail.be
On Fri, Mar 21, 2008 at 10:49:28AM -0700, Jan Dubois wrote:
> 
> PS: This is another can of worms, but I would even argue that any
> exception thrown that would unwind outside the DESTROY call frame
> while we are already unwinding the stack for an earlier exception
> should be a fatal error.  This would essentially mean that DESTROY
> should not throw exceptions at all (unless we make the fact that
> we are unwinding the stack already available in something like $^S).


But DESTROY is also the place to shutdown resources. And

    close $handle or die "...";

is very common idiom.



Abigail

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