Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

•Re: How to handle Errors?

by merlyn (Sage)
on Apr 05, 2004 at 19:54 UTC ( #342728=note: print w/replies, xml ) Need Help??


in reply to How to handle Errors?

Having just researched this for $CLIENT, I would propose that best-of-breed at the moment is Class::Exception Exception::Class to create the nested error classes, and Error to create syntax to catch exceptions.

If there's a method better than either of these, please let me know.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: How to handle Errors?
by adrianh (Chancellor) on Apr 05, 2004 at 21:33 UTC
    Class::Exception to create the nested error classes,

    Exception::Class... m'thinks :-) (which I agree is very nice)

    and Error to create syntax to catch exceptions.

    I have to admit I shun the syntactic sugar and just use plain old if statements. Avoids the whole accidentally-creating-closures issue / memory leak issues.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2023-02-01 15:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (10 votes). Check out past polls.

    Notices?