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.