Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Error Handling Misconception

by chromatic (Archbishop)
on Sep 03, 2003 at 23:09 UTC ( #288761=note: print w/replies, xml ) Need Help??


in reply to Re: Error Handling Misconception
in thread Error Handling Misconception

To catch die's with eval, the eval block must be terminated with a semi-colon.

Do you have a source for this?

sub dies { die "That's it!"; } if (eval { dies(); 1 }) { print "No death!\n"; } else { print "Death caught: $@\n"; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2020-05-31 16:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (175 votes). Check out past polls.

    Notices?