Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Thinking about module error handling

by sgifford (Prior)
on Jun 13, 2005 at 22:36 UTC ( #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
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? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2018-10-19 16:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...














    Results (110 votes). Check out past polls.

    Notices?