Package ubic.gemma.rest.providers
Class UnhandledExceptionMapper
- java.lang.Object
-
- ubic.gemma.rest.providers.AbstractExceptionMapper<Throwable>
-
- ubic.gemma.rest.providers.UnhandledExceptionMapper
-
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<Throwable>
@Provider @Component public class UnhandledExceptionMapper extends AbstractExceptionMapper<Throwable>
Render unhandled exceptions.The
RequestExceptionLoggerdoes not always work reliably, and more than often the exception is caught instead by the configured JSP error page.
-
-
Field Summary
-
Fields inherited from class ubic.gemma.rest.providers.AbstractExceptionMapper
log
-
-
Constructor Summary
Constructors Constructor Description UnhandledExceptionMapper(String hostUrl, io.swagger.v3.oas.models.OpenAPI spec, BuildInfo buildInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.ws.rs.core.Response.StatusgetStatus(Throwable exception)Translate the exception to an HTTPResponse.Status.protected booleanlogException(Throwable t)Indicate if the given exception should be logged.-
Methods inherited from class ubic.gemma.rest.providers.AbstractExceptionMapper
getResponseBuilder, getWellComposedErrorBody, toResponse
-
-
-
-
Constructor Detail
-
UnhandledExceptionMapper
@Autowired public UnhandledExceptionMapper(@Value("${gemma.hosturl}") String hostUrl, io.swagger.v3.oas.models.OpenAPI spec, BuildInfo buildInfo)
-
-
Method Detail
-
getStatus
protected javax.ws.rs.core.Response.Status getStatus(Throwable exception)
Description copied from class:AbstractExceptionMapperTranslate the exception to an HTTPResponse.Status.- Specified by:
getStatusin classAbstractExceptionMapper<Throwable>
-
logException
protected boolean logException(Throwable t)
Description copied from class:AbstractExceptionMapperIndicate if the given exception should be logged.- Overrides:
logExceptionin classAbstractExceptionMapper<Throwable>
-
-