Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: the try/catch example from "Programming Perl" analyzed

by rsteinke (Scribe)
on Aug 19, 2004 at 06:15 UTC ( #384188=note: print w/ replies, xml ) Need Help??


in reply to Re^3: the try/catch example from "Programming Perl" analyzed
in thread the try/catch example from "Programming Perl" analyzed

You could always use some sort of object wrapper to convert the strings into error objects, and hide that in the 'try' code,

local $_ = (blessed $@) ? $@ : MyStringErrorClass->new($@);
or some such. That class (or a function that returns different error objects depending on the error string, or something), would know all about the Errno module, and other standard kinds of errors.

Ron Steinke
<rsteinke@w-link.net>


Comment on Re^4: the try/catch example from "Programming Perl" analyzed
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2014-09-21 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (173 votes), past polls