Package io.dropwizard.views.common
Class ViewRenderExceptionMapper
- java.lang.Object
-
- io.dropwizard.views.common.ViewRenderExceptionMapper
-
- All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<jakarta.ws.rs.WebApplicationException>
,org.glassfish.jersey.spi.ExtendedExceptionMapper<jakarta.ws.rs.WebApplicationException>
@Provider public class ViewRenderExceptionMapper extends Object implements org.glassfish.jersey.spi.ExtendedExceptionMapper<jakarta.ws.rs.WebApplicationException>
AnExtendedExceptionMapper
that returns a 500 error response with a generic HTML error page when aViewRenderException
is the cause.- Since:
- 1.1.0
-
-
Field Summary
Fields Modifier and Type Field Description static String
TEMPLATE_ERROR_MSG
The generic HTML error page template.
-
Constructor Summary
Constructors Constructor Description ViewRenderExceptionMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isMappable(jakarta.ws.rs.WebApplicationException e)
jakarta.ws.rs.core.Response
toResponse(jakarta.ws.rs.WebApplicationException exception)
-
-
-
Field Detail
-
TEMPLATE_ERROR_MSG
public static final String TEMPLATE_ERROR_MSG
The generic HTML error page template.- See Also:
- Constant Field Values
-
-
Method Detail
-
toResponse
public jakarta.ws.rs.core.Response toResponse(jakarta.ws.rs.WebApplicationException exception)
- Specified by:
toResponse
in interfacejakarta.ws.rs.ext.ExceptionMapper<jakarta.ws.rs.WebApplicationException>
-
isMappable
public boolean isMappable(jakarta.ws.rs.WebApplicationException e)
- Specified by:
isMappable
in interfaceorg.glassfish.jersey.spi.ExtendedExceptionMapper<jakarta.ws.rs.WebApplicationException>
-
-