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?
please note that CandlepinExceptionMapper had to be registered via guice
(see CandlepinModule.java).
And guice looks for all folks who implement the mapper? Is this injected
at every method boundary?
-- bk