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

Re: Plz help me to create a perl script to catch errors and exceptions

by rvosa (Curate)
on Aug 22, 2007 at 15:16 UTC ( #634385=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    eval {
        &something_that_throws_exceptions
    ...
    if ( $@ ) {
        &exception_handler
    }
    
  2. or download this
    use Exception::Class::TCF;
    try {
        &something_that_throws_exceptions
    } catch 'Default' => \&exception_handler;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2021-01-15 15:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?