|
I also disagree on the fact that you shouldn't throw custom exceptions.
My opinion is that custom exceptions always have at least one precious piece of information for client code : their type !!!!
Suppose I create an XYZService that can throw XYZException, simply extending RuntimeException without any additional attribute or method. The ture added value of my custom exception is that I will be able in the client code to filter exception handling precisely for exceptions coming from this XYZService.
|