Class ConversionErrorHandler

  • All Implemented Interfaces:
    ExceptionHandler<io.micronaut.core.convert.exceptions.ConversionErrorException,​io.micronaut.http.HttpResponse>

    @Singleton
    @Produces
    public class ConversionErrorHandler
    extends java.lang.Object
    implements ExceptionHandler<io.micronaut.core.convert.exceptions.ConversionErrorException,​io.micronaut.http.HttpResponse>
    Handles exception of type ConversionErrorException.
    Since:
    1.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.micronaut.http.HttpResponse handle​(io.micronaut.http.HttpRequest request, io.micronaut.core.convert.exceptions.ConversionErrorException 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

      • ConversionErrorHandler

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

      • handle

        public io.micronaut.http.HttpResponse handle​(io.micronaut.http.HttpRequest request,
                                                     io.micronaut.core.convert.exceptions.ConversionErrorException exception)
        Description copied from interface: ExceptionHandler
        Handles an exception and returns the result.
        Specified by:
        handle in interface ExceptionHandler<io.micronaut.core.convert.exceptions.ConversionErrorException,​io.micronaut.http.HttpResponse>
        Parameters:
        request - The request
        exception - The exception type
        Returns:
        The result