Annotation Interface ServerExceptionMapper
ExceptionMapper
is generated
that calls the annotated method with the proper arguments.
When the annotation is placed on a method that is not a JAX-RS Resource class, the method handles exceptions in global
fashion (as do regular JAX-RS ExceptionMapper
implementations).
However, when it is placed on a method of a JAX-RS Resource class, the method is only used to handle exceptions originating
from
that JAX-RS Resource class.
Methods in a JAX-RS class annotated with this annotation will be used first when determining how to handle a thrown
exception.
This means that these methods take precedence over the global ExceptionMapper
classes.
In addition to the exception being handled, an annotated method can also declare any of the following parameters (in any order):
ContainerRequestContext
UriInfo
HttpHeaders
Request
ResourceInfo
SimpleResourceInfo
value
is not set, then the handled Exception type is deduced by the Exception type used in the method parameters
(there must be exactly one Exception type in this case).
The return type of the method must be either be of type Response
, Uni<Response>
, RestResponse
or
Uni<RestResponse>
.
See also UnwrapException
-
Optional Element Summary
-
Element Details
-
value
- Default:
- {}
-
priority
int priorityThe priority with which the exception mapper will be executed- Default:
- 5000
-