Hi guys,
I am trying to write two exception mappers, one that handles exception A
and another one that handles java.lang.Exception.

I don't know why but if I throw the A exception the handler that catches
the exception is the java.lang.Exception one instead of the one that
handles A exception.

According to spec:

When choosing an exception mapping provider to map an exception, an
implementation MUST use the provider whose generic type is the nearest
superclass of the exception.

So I think that in this case the nearest one is the expcetion itself (A)
and not Exception.

Any hint?

Thank you so much.

Reply via email to