Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Error Handling Misconception

by chromatic (Archbishop)
on Sep 03, 2003 at 23:09 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://288761]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-19 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found