You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by David Blevins <da...@visi.com> on 2007/01/05 19:17:33 UTC

i18n and Error handing (Re: Patch for JIRA 430)

On Jan 5, 2007, at 9:23 AM, Alan D. Cabrera wrote:

>
> On Jan 4, 2007, at 10:57 PM, Manu George wrote:
>
>> On 1/4/07, Dain Sundstrom <da...@iq80.com> wrote:
>>>
>>> We should add this check to the verifier.  Also it would be helpful
>>> to explicitly say in the exception message that only NotSupported  
>>> and
>>> Required are allowed.
>> Ok but I am a bit hazy about how validation takes place. A pointer on
>> where to look or how validation is done will be nice :). Also it  
>> would
>> be nice if we have a framework for exception handling where we can
>> give error codes in the exceptions and the messages will be picked up
>> from a property file or something like that. That way error message
>> changes won't need code changes
>
>
> This touches on some questions that I have been meaning to ask.
>
> How and where do we want to support i18n?

We're still using the code you wrote in this area, i.e. Logger with  
the inner i18n instance of the logger.  Or the  
o.a.openejb.util.Messages class directly.

We should be doing it everywhere....  Definitely feel free to yank  
messages out of any code you touch and put them in the closest  
Message.properties file.

>
> We throw a number of vanilla RuntimeExceptions.  Should we not  
> build a few OpenEJB exceptions on top of these?

You mean like catch them and wrap them with OpenEJBExceptions?   
That'd be fine.  We certainly should catch Throwable in more places  
as we're definitely not the only ones throwing RuntimeExceptions.

-David

>
> Regards,
> Alan
>
>