commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject Re: [all] exceptions and localization
Date Sat, 03 Feb 2007 21:47:06 GMT
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 <phil.steitz@gmail.com> wrote:
> On 2/3/07, James Carman <james@carmanconsulting.com> 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message