F
frank
Had a java design question to get what people think and what is
generally done. I've started to embrace more the use of throwing
exceptions (I'm an old C programmer did not have such a thing always
return codes) particular in the design of common code. I have been
having the tendency to let these common packages/methods/libs throw all
the base level exception and let the implementor/user of the class
decide what to do on an exception. The philosophy being that the common
code probably can not make the best decision in every case.
Well in some of these I can have a number of individual exceptions (10
maybe) particularly then you start having any type of class hierarchy.
Now some people are complaining that too many.
My argument back is you can just check the ones you want to then use a
generic catch all what's the big deal? Am I missing something?
Thanks,
Frank
generally done. I've started to embrace more the use of throwing
exceptions (I'm an old C programmer did not have such a thing always
return codes) particular in the design of common code. I have been
having the tendency to let these common packages/methods/libs throw all
the base level exception and let the implementor/user of the class
decide what to do on an exception. The philosophy being that the common
code probably can not make the best decision in every case.
Well in some of these I can have a number of individual exceptions (10
maybe) particularly then you start having any type of class hierarchy.
Now some people are complaining that too many.
My argument back is you can just check the ones you want to then use a
generic catch all what's the big deal? Am I missing something?
Thanks,
Frank