Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How do I report an error back to the user of my object?

by thargas (Deacon)
on Jun 05, 2012 at 12:23 UTC ( #974441=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package CoolObject;
    sub new {
    ...
      my $self = { name => 'new' }, $class;
      $self->loaddata() or die 'Error loading data';
      return $self;
    
  2. or download this
    my $co = CoolObject->new();
    # or if you want to trap the error...
    ...
    if ($@) {
      # do something about the error
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://974441]
help
Chatterbox?
[holli]: in fact
[holli]: i am testing
[holli]: something

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2017-09-24 13:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (274 votes). Check out past polls.

    Notices?