@Deprecated public class ServerError extends ErrorResult
Indicate an internal server error and set 500 status on response
This class is deprecated. Please use InternalServerError instead
Result.Payload| Constructor and Description |
|---|
ServerError()
Deprecated.
|
ServerError(int errorCode)
Deprecated.
|
ServerError(int errorCode,
String message,
Object... args)
Deprecated.
|
ServerError(int errorCode,
Throwable cause)
Deprecated.
|
ServerError(int errorCode,
Throwable cause,
String message,
Object... args)
Deprecated.
|
ServerError(String message,
Object... args)
Deprecated.
|
ServerError(Throwable t)
Deprecated.
|
ServerError(Throwable t,
String message,
Object... args)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static ServerError |
of(int errorCode,
String message,
Object... args)
Deprecated.
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)
Deprecated.
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 |
static ServerError |
of(String message,
Object... args)
Deprecated.
Returns a static ServerError instance and set the
Result.payload thread local with message specified. |
static ServerError |
of(Throwable cause,
String message,
Object... args)
Deprecated.
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 |
_localizedErrorMsg, applyMessage, attach, attachment, attachment, defaultMessage, errorCode, errorCode, getLocalizedMessage, of, of, of, of, of, of, of, toJsonString, toKVStore, toStringaddCookie, addHeader, apply, applyAfterCommitHandler, applyBeforeCommitHandler, applyCookies, applyHeaders, applyStatus, clearThreadLocals, header, payload, status, status, statusCode, timestamp, touchPayloaddoFillInStackTrace, 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)
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
cause - the causemessage - the messageargs - the message argumentspublic 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
errorCode - the app defined error codecause - the causemessage - the messageargs - the message argumentspublic static ServerError of(String message, Object... args)
Returns a static ServerError instance and set the 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 local
message - the messageargs - the message argumentspublic static ServerError of(int errorCode, String message, Object... args)
Returns a static ServerError instance and set the 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 local
errorCode - the app defined error codemessage - the messageargs - the message argumentsCopyright © 2014–2018 OSGL (Open Source General Library). All rights reserved.