cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: How to handle a configuration problem generally in CXF code
Date Tue, 07 Oct 2008 21:27:35 GMT
Hi Dan,

I have included a first exception. It looks like this:

org.apache.cxf.common.i18n.Message msg = new 
org.apache.cxf.common.i18n.Message("INSUFFICIENT_CONFIGURATION_CONDUIT", 
LOG, name);
throw new ConfigurationException(msg);

This looks extremly ugly as Message is already imported either as a CXF 
message or a JMS message. It will be even uglier when the code formatter 
has done its work.

Is it necessary that the Message is built with new? CanĀ“t we simply do 
something like this:
throw new ConfigurationException("INSUFFICIENT_CONFIGURATION_CONDUIT", 
LOG, name);

We could add this Constructor to UncheckedException.

Greetings

Christian


Daniel Kulp schrieb:
> I'd definitely prefer if the excpetion was on of the I18N things.   A 
> LARGE chunk of our users are actually from China.  According to google 
> analytics, China is #2 after the US.   It's definitely important to keep 
> the option open to make this stuff localizable.  ESPECIALLY for 
> configuration things where a non-developer might need to make changes.  
> More "admin" like tasks.   
>
> Note: if you have a Logger, you already have the bundle.   The i18n 
> message can take the Logger instead of the bundle.
>
> Dan
>
>   


-- 

Christian Schneider
---
http://www.liquid-reality.de


Mime
View raw message