Package kos.api
Class DefaultExceptionHandler
- java.lang.Object
-
- kos.api.DefaultExceptionHandler
-
- All Implemented Interfaces:
ExceptionHandler
class DefaultExceptionHandler extends Object implements ExceptionHandler
-
-
Constructor Summary
Constructors Constructor Description DefaultExceptionHandler(KosConfiguration kosConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Responsehandle(io.vertx.core.http.HttpServerRequest request, io.vertx.core.http.HttpServerResponse response, Throwable cause)Handles exceptions by returning aResponseobject that will be send as http response to the client.private ResponsehandleUnknownError(io.vertx.core.http.HttpServerRequest request, Throwable cause)
-
-
-
Field Detail
-
log
private final Lang.Lazy<io.vertx.core.logging.Logger> log
-
-
Constructor Detail
-
DefaultExceptionHandler
public DefaultExceptionHandler(KosConfiguration kosConfiguration)
-
-
Method Detail
-
handle
public Response handle(io.vertx.core.http.HttpServerRequest request, io.vertx.core.http.HttpServerResponse response, Throwable cause)
Description copied from interface:ExceptionHandlerHandles exceptions by returning aResponseobject that will be send as http response to the client.- Specified by:
handlein interfaceExceptionHandler- Parameters:
request- current request contextresponse- object representing current responsecause- error cause- Returns:
- object that will be send as http response to the client
-
-