On Apr 3, 2009, at 2:29 PM, Markus Karg wrote:
> I wrote my own XYZException mapper. It returns different Responses
> regarding on its own decision. That works well.
>
> But in some cases, the XYZException is just a wrapper around another
> (unkown) exception, found in e.getCause().
>
> I'd like Jersey to check whether there is an exception mapper for
> the cause.
>
> How can this be done?
>
Inject:
@Context Providers ps;
onto your exception mapper and call:
ps.getExceptionMapper()
https://jsr311.dev.java.net/nonav/javadoc/javax/ws/rs/ext/Providers.html
#getExceptionMapper(java.lang.Class)
Paul.