|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re: when to use die, questions about program feedback to the coderby cbrandtbuffalo (Deacon) |
| on Mar 09, 2006 at 12:55 UTC ( [id://535452]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
If you are going down this road, consider Carp::croak and Carp::confess as well. They give a lot more info on the calling context when they fire and can make it much easier to track down where the error came from.
If you do convert to throwing exceptions for errors, you can use evals in your calling code to control whether the exceptions will actually kill your program. There is a nice chapter in Damian's Perl Best Practices book on error handling too.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||