Class JsonExceptionHandler
java.lang.Object
io.micronaut.http.server.exceptions.JsonExceptionHandler
- All Implemented Interfaces:
ExceptionHandler<io.micronaut.json.JsonSyntaxException,Object>
@Produces
@Singleton
@Internal
public final class JsonExceptionHandler
extends Object
implements ExceptionHandler<io.micronaut.json.JsonSyntaxException,Object>
Default exception handler for JSON processing errors.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionJsonExceptionHandler(ErrorResponseProcessor<?> responseProcessor) Constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.http.server.exceptions.ExceptionHandler
handle
-
Constructor Details
-
JsonExceptionHandler
Constructor.- Parameters:
responseProcessor- Error Response Processor
-
-
Method Details
-
handle
public Object handle(io.micronaut.http.HttpRequest request, io.micronaut.json.JsonSyntaxException exception) Description copied from interface:ExceptionHandlerHandles an exception and returns the result.- Specified by:
handlein interfaceExceptionHandler<E extends Exception,Object> - Parameters:
request- The requestexception- The exception type- Returns:
- The result
-