Perl-Sensitive Sunglasses | |
PerlMonks |
Re: die in a DESTROYby adrianh (Chancellor) |
on Sep 28, 2005 at 13:47 UTC ( [id://495738]=note: print w/replies, xml ) | Need Help?? |
If, inside a DESTORY, I *really* want to CORE::die, how can I do it? Short answer - you can't. Exceptions don't propagate out of DESTROY blocks. If you want to detect some kind of error condition that happened during DESTROY time your best bet would be to set a global error flag and then test that. Personally I'm would be suspicious of DESTROY blocks that would need to throw exceptions.... can you describe what you want to do in more detail? There might be a better way :-)
In Section
Seekers of Perl Wisdom
|
|