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

Re^2: Best Practices for Exception Handling

by adrianh (Chancellor)
on Jan 29, 2003 at 11:47 UTC ( [id://230921]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Foo::Exceptions;
    use strict;
    ...
            # etc.
    
    );
    
  2. or download this
    Foo::Exception::DBI->throw($DBI::errstr)
    Foo::Exception::Dupe->throw(name => $name, error => $value);
    
  3. or download this
    eval {$foo->something_that_might_die};
    if (ref($@)) {
    ...
        };
    };
    die $@ if $@;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-09-16 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (21 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.