public class ServerAPIException
extends io.vertx.core.impl.NoStackTraceThrowable
Modifier and Type | Field and Description |
---|---|
static java.lang.String | GENERIC_ERROR A generic error occurred, see reason for details |
static java.lang.String | HTTP_ERROR The server issued an HTTP request (e.g. |
static java.lang.String | INVALID_PROPERTY_SYNTAX_ERROR The syntax of a property command is not valid |
Constructor and Description |
---|
ServerAPIException(java.lang.String type, java.lang.String reason) Create a new exception |
Modifier and Type | Method and Description |
---|---|
java.lang.String | getType() Get the exception type |
io.vertx.core.json.JsonObject | toJson() Serialize exception |
static io.vertx.core.json.JsonObject | toJson(java.lang.String type, java.lang.String reason) Create a JSON object from a type and a reason |
public static final java.lang.String INVALID_PROPERTY_SYNTAX_ERROR
public static final java.lang.String HTTP_ERROR
public static final java.lang.String GENERIC_ERROR
public ServerAPIException(java.lang.String type, java.lang.String reason)
type
- the exception typereason
- the reason for the exceptionpublic java.lang.String getType()
public io.vertx.core.json.JsonObject toJson()
public static io.vertx.core.json.JsonObject toJson(java.lang.String type, java.lang.String reason)
type
- the typereason
- the reason