On Mon, Apr 12, 2010 at 03:46:13PM -0400, Bryan Kearney wrote:
On 04/12/2010 03:41 PM, Dmitri Dolguikh wrote:
> On 10-04-12 3:56 PM, Bryan Kearney wrote:
>> On 04/12/2010 01:41 PM, Dmitri Dolguikh wrote:
>>> I committed the first cut of parseable exceptions. The
'interesting'
>>> parts:
>>>
>>> CandlepinExceptionMapper.java - the bit that maps exceptions thrown by
>>> Resources to http responses
>>> CandlepinException.java - base class for exceptions
>>> BadRequestException.java - I modified just one exception to be handled
>>> by the ExceptionMapper, as a trial/demo
>>
>> Looks good all and all. One comments.. is the label meant to be the
>> ID? If so, should we have a list of valid ids?
I like the current implementation with the mapper handling the proper
serialization and the specific BadRequestException.
> I'm not sure. I thought it was short message/long message.
More or less
> for disambiguation of http return codes.
Well.. before we go too far. Lets figure this out (as well as i18n). If
we are going to go throgh the code, lets do it once.
+1 so what would we like to have with respect to the messages? We could
stick with short & long messages, and just use i18n keys for it.
jesus
--
jesus m. rodriguez | jesusr(a)redhat.com
principal software engineer | irc: zeus
red hat systems management | 919.754.4413 (w)
rhce # 805008586930012 | 919.623.0080 (c)
+---------------------------------------------+
| "Those who cannot remember the past |
| are condemned to repeat it." |
| -- George Santayana |
+---------------------------------------------+