Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 perusing the Monastery: (5)
As of 2021-03-08 00:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (123 votes). Check out past polls.

    Notices?