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
please note that CandlepinExceptionMapper had to be registered via guice
(see CandlepinModule.java).
Comments/thoughts are welcome (and are encouraged).
Cheers,
-Dmitri