How would they subclass?  The commons math code will be throwing these
exceptions themselves, no?  They wouldn't be able to tell commons math
to throw a specific type of exception class that they wrote.

I agree that the default case (the JDK's getMessage() method) should
work so that nobody has to know about the special i18n facilities.
But, if you're truly looking to provide a rich i18n framework for
exceptions, you need to make it extensible/adaptable.

On 2/3/07, Phil Steitz <[EMAIL PROTECTED]> wrote:
On 2/3/07, James Carman <[EMAIL PROTECTED]> wrote:
>
> How does a calling application override the message, if they wish?


They could subclass and override translate() or, assuming we take your
suggestion and carry the data along, they could access the data and do
whatever they want with it.  I agree that it is a good idea to persist and
expose the key and parts.  I just also think it is good for getMessage() and
getMessage(Locale) to provide default localization out of the box.

Phil



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to