go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Monks,
Can someone point me in the right direction on error handling with packages? I have some die statements in a custom package, in case certain files don't exist, but it's preventing the rest of my script from executing when the die is encountered. Ideally, I would like to build in an error checking mechanism that if the package dies, I can catch this within the script and perform some action based on it. I thought something like this would work: but $status never prints anything if the package dies. I have "return 1" at the end of the package, so maybe that's my problem? My error handling skills are limited to "die" and "warn". I would appreciate if someone could point me in the right direction on how to handle this. Thanks, Dru In reply to Error Handling with Packages by Dru
|
|