Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Style Point: Catching eval { } errors

by dref (Novice)
on Nov 28, 2003 at 12:29 UTC ( #310710=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub try (&@) {
      my($code, $error_handler) = @_;
    ...
    sub catch (&) {
      return @_;
    }
    
  2. or download this
    my $msg;
    try {
    ...
      print "File could not be opened because of: $@\n";
      $msg = "BAAAAH";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://310710]
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-31 20:03 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 (281 votes), past polls