commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <Joerg.Schai...@scalaris.com>
Subject Re: [BeanUtils2] Some proposals for an exception name
Date Tue, 19 Jun 2012 07:11:11 GMT
Hi Simo,

Simone Tripodi wrote:

[snip]

>>> A suggestion:
>>>
>>> we are often using the String.format() method to format Exception
>>> messages - which is very good, IMHO - and since we are introducing a
>>> new Exception we can take advantage for reducing its use, centralizing
>>> the message format in the new exception itself, have a look at the
>>> Digester's ErrorMessage <http://s.apache.org/wiR>

A better approach is IMHO the Contexted(Runtime)Exception of the 
oac.lang3.exception package. Instead of writing a prose for the message 
text, you can use a short informative statement and add all relevant 
additional information in a structured way with the possibility to be 
evaluated properly by a client. You may even enrich the information at 
higher levels by catching the exception, adding the info and rethrow it 
again.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message