Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Exception::Class - how to use?

by rvosa (Curate)
on Aug 24, 2005 at 21:20 UTC ( [id://486368]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Bio::Phylo::Exceptions;
    use Exception::Class (
    ...
        { isa => 'Bio::Phylo::Exceptions' }
    );
    1;
    
  2. or download this
    use Scalar::Util qw(looks_like_number);
    
    ...
       ? $self->{'NUMBER'} = $number 
       : Bio::Phylo::Exceptions::BadNumber->throw(error => 'bad number');
    }
    
  3. or download this
    # try
    eval { $obj->set_number(sdf7897) };
    ...
    if (UNIVERSAL::isa($@,'Bio::Phylo::Exceptions::BadNumber')){
       # do something
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-03-29 02:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found