Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Best Practices for Exception Handling

by adrianh (Chancellor)
on Jan 29, 2003 at 11:47 UTC ( #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
Node Status?
node history
Node Type: note [id://230921]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (15)
As of 2015-07-07 20:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls