Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: How not to test exceptions

by jk2addict (Chaplain)
on Jul 22, 2005 at 13:03 UTC ( #477212=note: print w/replies, xml ) Need Help??


in reply to Re: How not to test exceptions
in thread How not to test exceptions

That's good info. I wish it was mentioned in its pod. For now I'm ok I think based on the fact that I don't actually use try/catch in the code (maybe once), but I just use throw within the code when things go wrong. It sounds like the problems would more effect people using the dist catching MY exceptions in their code.

Is there a decent replacement that can be shoehorned easily? Time to surf CPAN...

Updated. Not that Error isn't evil based on others experience, but AxKit uses Error. It can't be all that bad. I've looked ad Exception, but the lack of the 'catch with' sugar annoys me so...Exceptions are try/catch after all.

Replies are listed 'Best First'.
Re^3: How not to test exceptions
by diotalevi (Canon) on Jul 22, 2005 at 14:23 UTC
    The problems Error has are introduced when you introduce the sugar which is why any Exception using code which avoids this error will also avoid the sugar. You can't get that sugar without also introducing that class of bugs. Its inherent.
      While that maybe true, who knows that? I didn't. Users just find Error on CPAN, install it and go about try/catching none the wiser. Maybe someone knowledgeable about the inherant problems with Errors try/catch should submit a pod path, or at least rate it accordinly.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2022-01-19 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (55 votes). Check out past polls.

    Notices?