Package kos.api

Class DefaultExceptionHandler

    • Field Detail

      • log

        private final Lang.Lazy<io.vertx.core.logging.Logger> log
    • Constructor Detail

      • DefaultExceptionHandler

        public DefaultExceptionHandler​(KosContext kosContext)
    • Method Detail

      • handle

        public Response handle​(io.vertx.core.http.HttpServerRequest request,
                               io.vertx.core.http.HttpServerResponse response,
                               Throwable cause)
        Description copied from interface: ExceptionHandler
        Handles exceptions by returning a Response object that will be send as http response to the client.
        Specified by:
        handle in interface ExceptionHandler
        Parameters:
        request - current request context
        response - object representing current response
        cause - error cause
        Returns:
        object that will be send as http response to the client
      • handleUnknownError

        private Response handleUnknownError​(io.vertx.core.http.HttpServerRequest request,
                                            Throwable cause)