Class ConversionErrorHandler
- java.lang.Object
-
- io.micronaut.http.server.exceptions.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 typeConversionErrorException.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description ConversionErrorHandler(ErrorResponseProcessor<?> responseProcessor)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.micronaut.http.HttpResponsehandle(io.micronaut.http.HttpRequest request, io.micronaut.core.convert.exceptions.ConversionErrorException exception)Handles an exception and returns the result.
-
-
-
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:ExceptionHandlerHandles an exception and returns the result.- Specified by:
handlein interfaceExceptionHandler<io.micronaut.core.convert.exceptions.ConversionErrorException,io.micronaut.http.HttpResponse>- Parameters:
request- The requestexception- The exception type- Returns:
- The result
-
-