public class ServerError extends ErrorResult
Result.Payload| Constructor and Description |
|---|
ServerError() |
ServerError(int errorCode) |
ServerError(int errorCode,
String message,
Object... args) |
ServerError(int errorCode,
Throwable cause) |
ServerError(int errorCode,
Throwable cause,
String message,
Object... args) |
ServerError(String message,
Object... args) |
ServerError(Throwable t) |
ServerError(Throwable t,
String message,
Object... args) |
| Modifier and Type | Method and Description |
|---|---|
static ServerError |
of(int errorCode,
String message,
Object... args)
Returns a static ServerError instance and set the
Result.payload thread local
with message specified. |
static ServerError |
of(int errorCode,
Throwable cause,
String message,
Object... args)
Returns a static ServerError instance and set the
Result.payload thread local
with message specified, and store the cause specified into the Result.payload
thread local
When calling the instance on Throwable.getMessage() method, it will return whatever
stored in the Result.payload thread local; When calling the instance on
Throwable.getCause() method, it will return whatever stored in the Result.payload
thread local |
static ServerError |
of(String message,
Object... args)
Returns a static ServerError instance and set the
Result.payload thread local
with message specified. |
static ServerError |
of(Throwable cause,
String message,
Object... args)
Returns a static ServerError instance and set the
Result.payload thread local
with message specified, and store the cause specified into the Result.payload
thread local
When calling the instance on Throwable.getMessage() method, it will return whatever
stored in the Result.payload thread local; When calling the instance on
Throwable.getCause() method, it will return whatever stored in the Result.payload
thread local |
_localizedErrorMsg, applyMessage, attach, attachment, attachment, defaultMessage, errorCode, getLocalizedMessage, of, of, of, of, of, of, of, toJsonString, toKVStore, toStringapply, applyAfterCommitHandler, applyBeforeCommitHandler, applyStatus, clearThreadLocals, payload, status, status, statusCodedoFillInStackTrace, fillInStackTraceaddSuppressed, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic ServerError()
public ServerError(Throwable t)
public ServerError(int errorCode)
public ServerError(int errorCode,
Throwable cause)
public static ServerError of(Throwable cause, String message, Object... args)
Result.payload thread local
with message specified, and store the cause specified into the Result.payload
thread local
When calling the instance on Throwable.getMessage() method, it will return whatever
stored in the Result.payload thread local; When calling the instance on
Throwable.getCause() method, it will return whatever stored in the Result.payload
thread localcause - the causemessage - the messageargs - the message argumentspublic static ServerError of(int errorCode, Throwable cause, String message, Object... args)
Result.payload thread local
with message specified, and store the cause specified into the Result.payload
thread local
When calling the instance on Throwable.getMessage() method, it will return whatever
stored in the Result.payload thread local; When calling the instance on
Throwable.getCause() method, it will return whatever stored in the Result.payload
thread localerrorCode - the app defined error codecause - the causemessage - the messageargs - the message argumentspublic static ServerError of(String message, Object... args)
Result.payload thread local
with message specified.
When calling the instance on Throwable.getMessage() method, it will return whatever
stored in the Result.payload thread localmessage - the messageargs - the message argumentspublic static ServerError of(int errorCode, String message, Object... args)
Result.payload thread local
with message specified.
When calling the instance on Throwable.getMessage() method, it will return whatever
stored in the Result.payload thread localerrorCode - the app defined error codemessage - the messageargs - the message argumentsCopyright © 2017. All Rights Reserved.