I only have a single ExceptionMapper registered, it implements ExceptionMapper<Throwable>. My test case throws a javax.validation.ConstraintViolationException via bean validation (JSR-349). I have tried ExceptionMapper<RuntimeException> and ExceptionMapper<Exception> in addition to ExceptionMapper<Throwable> and none of these 3 catch the ConstraintViolationException. However, if I change the exception mapper to implement ExceptionMapper<ConstraintViolationException> my code will run. Am I wrong in thinking that I should be able to register an exception mapper for Throwable, Exception, or RuntimeException and catching these bean validation exceptions?
BTW, if I throw an explicit RuntimeException from within my JAX-RS resource (@GET annotated method on a registered resource), the ExceptionMapper<RuntimeException> code runs just fine.
This appears to be a bug? What about other exceptions that transpire before the resource like ParamException and any subclasses thereof?
Thanks,
Eric
________________________________________________________
The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.