Hi. > [...] > > So what I propose the following set of constructors : > - no argument > -> this would lead to the default message USER_EXCEPTION > - a throwable > -> this would lead to the default message USER_EXCEPTION > - a throwable and one pattern > -> this would be used to specify the generic part > - a throwable and two patterns > -> this would be used to specify both the generic > and the specific part
As I said, this is similar to the code of "MathIllegalArgumentException". That's fine. > In fact, all these constructors end up calling the last one, by adding > some null arguments. All arguments can be null. No, IMHO, the "general" parameter should not be null. If a user defines a class that inherit from "MathUserException", the meaning will exist and should be reflected in the "general" pattern. [Allowing null is suggesting to use this "tool" in a wrong way.] However, this is really nitpicking; the result will just be useless empty error message, and that will be the user's fault. So, allow "null" if you like ;-) > [...] Best regards, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org