public class Err extends RuntimeException
Status
. The status field will be set in the HTTP response. See Err.Handler
for more details on how to deal with exceptions.
Modifier and Type | Class and Description |
---|---|
static class |
Err.BadMediaType
Exception thrown from MediaType.parse(String) in case of encountering an invalid media type specification String.
|
static class |
Err.DefHandler
Default err handler it does content negotation.
|
static interface |
Err.Handler
Handle and render exceptions.
|
static class |
Err.Missing
Missing parameter/header or request attribute.
|
Constructor and Description |
---|
Err(int status)
Creates a new Err .
|
Err(int status, String message)
Creates a new Err .
|
Err(int status, String message, Throwable cause)
Creates a new Err .
|
Err(int status, Throwable cause)
Creates a new Err .
|
Err(Status status)
Creates a new Err .
|
Err(Status status, String message)
Creates a new Err .
|
Err(Status status, String message, Throwable cause)
Creates a new Err .
|
Err(Status status, Throwable cause)
Creates a new Err .
|
Err(WebSocket.CloseStatus status, String message)
Creates a new Err .
|
Modifier and Type | Method and Description |
---|---|
int |
statusCode() |
Map<String,Object> |
toMap()
Produces a friendly view of the err, resulting map has these attributes:
|
Map<String,Object> |
toMap(boolean stacktrace)
Produces a friendly view of the err, resulting map has these attributes:
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public Err(Status status, String message, Throwable cause)
Err
.
status
- A HTTP status. Required.
message
- A error message. Required.
cause
- The cause of the problem.
public Err(int status, String message, Throwable cause)
Err
.
status
- A HTTP status. Required.
message
- A error message. Required.
cause
- The cause of the problem.
public Err(WebSocket.CloseStatus status, String message)
Err
.
status
- A web socket close status. Required.
message
- Close message.
public Err(Status status, String message)
Err
.
status
- A HTTP status. Required.
message
- A error message. Required.
public Err(int status, String message)
Err
.
status
- A HTTP status. Required.
message
- A error message. Required.
public Err(Status status, Throwable cause)
Err
.
status
- A HTTP status. Required.
cause
- The cause of the problem.
public Err(int status, Throwable cause)
Err
.
status
- A HTTP status. Required.
cause
- The cause of the problem.
public Err(int status)
Err
.
status
- A HTTP status. Required.
public int statusCode()
public Map<String,Object> toMap()
message: exception message (if present) status: status code reason: a status code reason
public Map<String,Object> toMap(boolean stacktrace)
message: exception message (if present) stacktrace: array with the stacktrace status: status code reason: a status code reason
stacktrace
- True for adding stacktrace.
Copyright © 2019. All rights reserved.