Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Errors in Module - What to do with them.

by runrig (Abbot)
on Sep 26, 2001 at 23:45 UTC ( #114921=note: print w/replies, xml ) Need Help??


in reply to Errors in Module - What to do with them.

Some would say it depends on how fatal the error should be. If you die, and document that that's what happens, you can let the caller deal with it with an 'eval' if he likes, and the error message will be in $@. If there's an error message to report, I usually prefer that to returning undef and putting the error message in some package variable (at least lately).
  • Comment on Re: Errors in Module - What to do with them.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://114921]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2021-10-22 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (85 votes). Check out past polls.

    Notices?