I would propose to add the following to UncheckedException and
corresponding "super" calls to all exceptions.
public UncheckedException(String code, ResourceBundle bundle,
Object...params) {
this(new Message(code, bundle, params));
}
public UncheckedException(String code, Throwable t, ResourceBundle
bundle, Object...params) {
this(new Message(code, bundle, params), t);
}
To use these you could do the following at the start of the class:
static final Logger LOG = LogUtils.getL7dLogger(JMSConfigFeature.class);
static final ResourceBundle BUNDLE = LOG.getResourceBundle();
and then:
throw new ConfigurationException("JMSCONFIGFEATURE_ONLY_JMS", BUNDLE);
I have checked where the i18n Message is used and it seems only to be
used for exceptions. So would it perhaps make sense to deprecate it and
always create exceptions like above?
Was there a special reason for the introduction of i18n Message?
Any opinions?
Greetings
Christian
Benson Margulies schrieb:
I'm +1 to the constructor. I find the new-ing of messages to be a pain.
On Tue, Oct 7, 2008 at 5:27 PM, Christian Schneider <[EMAIL PROTECTED]
wrote:
--
Christian Schneider
---
http://www.liquid-reality.de