Hello all
java.lang.Throwable has two methods for fetching the exception message:
getMessage() and getLocalizedMessage(). I realize that the later is very
rarely implemented. However I'm considering to use it for some (not
necessarily all) exceptions implemented in Apache SIS. The proposed
policy would be:
* getMessage() returns the message in the system default locale.
* getLocalizedMessage() returns the message in the locale of the
object that produced it.
For example on a server machine configured for the English locale, if an
AngleFormat object has been created for parsing angles in the French
locale and if that AngleFormat throw a java.text.ParseException, then
getMessage() on that exception would return the parsing error message in
English while getLocalizedMessage() would return the message in French.
In a client-server architecture, the intend is that getMessage() would
use the locale on the server side, while getLocalizedMessage() would use
the locale on the client side. This is based on the assumption that the
above-cited AngleFormat has been created for parsing client's input.
Is there any opinion on that?
Martin