Class JsonExceptionHandler
java.lang.Object
io.micronaut.http.server.exceptions.JsonExceptionHandler
- All Implemented Interfaces:
ExceptionHandler<JsonSyntaxException,
Object>
@Produces
@Singleton
@Internal
public final class JsonExceptionHandler
extends Object
implements ExceptionHandler<JsonSyntaxException,Object>
Default exception handler for JSON processing errors.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
ConstructorDescriptionJsonExceptionHandler
(ErrorResponseProcessor<?> responseProcessor) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionhandle
(HttpRequest request, JsonSyntaxException 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
-
JsonExceptionHandler
Constructor.- Parameters:
responseProcessor
- Error Response Processor
-
-
Method Details
-
handle
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
-