This class encourages the use of resource bundles as message (and detail text) sources so that localization may easily be implemented.
Methods that return text will attempt to find the message by code in the ResourceBundle, but will fall back to simply returning the code if no such message can be found in the ResourceBundle, or no such ResourceBundle exists or the bundleName given in the constructor is null.
This enables developers to temporarily construct exceptions with something like:
throw new MyException(null, "myMessageId", null, null, null);
Exceptions of this type have the benefit that they can be easily converted to informative, localized SOAP Fault envelopes. @author Chris Wilper
|
|