Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Thinking about module error handling

by Tanktalus (Canon)
on Jun 13, 2005 at 22:46 UTC ( #466314=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $rc = func();
    if ($rc != 0) {
      die "Failed to func!";
    }
    
  2. or download this
    eval {
      func();
    ...
    if ($@) {
      die "Failed to func: $@";
    }
    
  3. or download this
    use Error::Handler;
    $rc = func();
    if (not $rc->ok()) {
      die $rc->error_msg();
    }
    
  4. or download this
    $rc = func();
    if ($rc != 0) {
      die "Failed to func!";
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2019-12-10 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?