Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Thinking about module error handling

by Tanktalus (Canon)
on Jun 13, 2005 at 22:46 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://466314]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-24 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found