HttpHandler
public class ExceptionHandler extends Object implements HttpHandler
Modifier and Type | Field | Description |
---|---|---|
static AttachmentKey<Throwable> |
THROWABLE |
Constructor | Description |
---|---|
ExceptionHandler(HttpHandler handler) |
Modifier and Type | Method | Description |
---|---|---|
<T extends Throwable> |
addExceptionHandler(Class<T> clazz,
HttpHandler handler) |
|
void |
handleRequest(HttpServerExchange exchange) |
Handle the request.
|
public static final AttachmentKey<Throwable> THROWABLE
public ExceptionHandler(HttpHandler handler)
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
public <T extends Throwable> ExceptionHandler addExceptionHandler(Class<T> clazz, HttpHandler handler)
Copyright © 2018. All rights reserved.