| Package | Description |
|---|---|
| org.osgl.mvc.result |
| Modifier and Type | Method and Description |
|---|---|
static ServerError |
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 |
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 |
ServerError.of(String message,
Object... args)
Returns a static ServerError instance and set the
Result.payload thread local
with message specified. |
static ServerError |
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 |
Copyright © 2017. All Rights Reserved.