Class JsonExceptionHandler

  • All Implemented Interfaces:
    ExceptionHandler<com.fasterxml.jackson.core.JsonProcessingException,​java.lang.Object>

    @Produces
    @Singleton
    @Requires(classes=com.fasterxml.jackson.core.JsonProcessingException.class)
    public class JsonExceptionHandler
    extends java.lang.Object
    implements ExceptionHandler<com.fasterxml.jackson.core.JsonProcessingException,​java.lang.Object>
    Default exception handler for JSON processing errors.
    Since:
    1.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object handle​(io.micronaut.http.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
    • Constructor Detail

      • JsonExceptionHandler

        @Inject
        public JsonExceptionHandler​(ErrorResponseProcessor<?> responseProcessor)
        Constructor.
        Parameters:
        responseProcessor - Error Response Processor
    • Method Detail

      • handle

        public java.lang.Object handle​(io.micronaut.http.HttpRequest request,
                                       com.fasterxml.jackson.core.JsonProcessingException exception)
        Description copied from interface: ExceptionHandler
        Handles an exception and returns the result.
        Specified by:
        handle in interface ExceptionHandler<com.fasterxml.jackson.core.JsonProcessingException,​java.lang.Object>
        Parameters:
        request - The request
        exception - The exception type
        Returns:
        The result