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

Re: Exception Classes Advice on Subclasses

by blazar (Canon)
on Dec 21, 2005 at 11:13 UTC ( #518284=note: print w/ replies, xml ) Need Help??


in reply to Exception Classes Advice on Subclasses

I'm not familiar with Exception::Class, but AFAICT it seems to me that if you use fields then you will have to manage them at throw() time, whereas if you use subclasses, which may seem a slightly less compact approach but really still amounts to code-reusing, you will have an immediate syntax to just throw() an exception as needed.

Basically, as it often happens, it is mainly a matter of personal taste/preference. You could even adopt a mixed approach. Personally I guess I would go for subclasses.


Comment on Re: Exception Classes Advice on Subclasses
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2014-09-19 23:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (151 votes), past polls