public enum JsonServiceError extends Enum<JsonServiceError>
JSON service error.
This class provides definition of JSON-RPC error codes.
| Enum Constant and Description |
|---|
CUSTOM_ERROR |
INTERNAL_ERROR |
INVALID_PARAMS |
INVALID_REQUEST |
METHOD_NOT_FOUND |
PARSE_ERROR |
SERVER_ERROR |
| Modifier and Type | Method and Description |
|---|---|
int |
getCode()
Returns error code.
|
String |
getMessage()
Returns error message.
|
void |
setMessage(String message)
Sets error message.
|
static JsonServiceError |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JsonServiceError[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonServiceError PARSE_ERROR
public static final JsonServiceError INTERNAL_ERROR
public static final JsonServiceError INVALID_PARAMS
public static final JsonServiceError METHOD_NOT_FOUND
public static final JsonServiceError INVALID_REQUEST
public static final JsonServiceError SERVER_ERROR
public static final JsonServiceError CUSTOM_ERROR
public static JsonServiceError[] values()
for (JsonServiceError c : JsonServiceError.values()) System.out.println(c);
public static JsonServiceError valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getCode()
public String getMessage()
public void setMessage(String message)
Copyright © 2016. All rights reserved.