Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Thinking about module error handling

by sgifford (Prior)
on Jun 13, 2005 at 22:36 UTC ( [id://466310]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $obj = Some::Object->new()
      or die "Couldn't create Some::object - $!\n";
    
  2. or download this
    package Some::Object;
    
    ...
        my $self = shift;
        $self->{_errhandler};
    }
    
  3. or download this
      my $obj = Some::Object->new()
        or die "Couldn't create Some::Object - ".Some::Object->lasterr;
      $obj->method_call()
        or die "Couldn't method_call $obj - ".$obj->lasterr;
    
  4. or download this
      my $err;
      my $obj = Some::Object->new(ErrorHolder => \$err)
        or die "Couldn't create Some::Object - $err\n";
      $obj->method_call
        or die "Couldn't method_call $obj - $err\n";
    
  5. or download this
      Ekahau::ErrHandler->set_errhandler(sub { die @_ } );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-03-29 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found