Class JacksonExceptionHandler
java.lang.Object
io.micronaut.http.server.exceptions.JacksonExceptionHandler
- All Implemented Interfaces:
ExceptionHandler<com.fasterxml.jackson.core.JsonProcessingException,
Object>
@Produces
@Singleton
@Requires(classes=com.fasterxml.jackson.core.JsonProcessingException.class)
@Internal
public final class JacksonExceptionHandler
extends Object
implements ExceptionHandler<com.fasterxml.jackson.core.JsonProcessingException,Object>
Default exception handler for jackson processing errors.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
ConstructorDescriptionJacksonExceptionHandler
(ErrorResponseProcessor<?> responseProcessor) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionhandle
(HttpRequest request, com.fasterxml.jackson.core.JsonProcessingException exception) Handles an exception and returns the result.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.server.exceptions.ExceptionHandler
handle
-
Constructor Details
-
JacksonExceptionHandler
Constructor.- Parameters:
responseProcessor
- Error Response Processor
-
-
Method Details
-
handle
public Object handle(HttpRequest request, com.fasterxml.jackson.core.JsonProcessingException exception) Description copied from interface:ExceptionHandler
Handles an exception and returns the result.- Specified by:
handle
in interfaceExceptionHandler<E extends Exception,
Object> - Parameters:
request
- The requestexception
- The exception type- Returns:
- The result
-