public class StateServerException extends java.lang.Exception implements ReWrappableException<StateServerException>
Constructor and Description |
---|
StateServerException(StatusCodes statusCode)
creates a state server exception
|
StateServerException(StatusCodes statusCode,
java.lang.String message)
Creates a state server exception.
|
StateServerException(StatusCodes statusCode,
java.lang.String message,
java.lang.Throwable cause)
Creates a state server exception with an original exception
|
StateServerException(StatusCodes statusCode,
java.lang.Throwable cause)
Creates a state server exception
|
Modifier and Type | Method and Description |
---|---|
protected int |
getCreatedOnThread() |
StatusCodes |
getStatusCode() |
StateServerException |
reWrap(StateServerException e)
Rewrap existing an StateServerException with a new one if the thread the initial
exception was generated on is different from the current thread.
|
public StateServerException(StatusCodes statusCode)
statusCode
- the status code returned from the serverpublic StateServerException(StatusCodes statusCode, java.lang.String message)
statusCode
- the status code returned from the server.message
- the string message to displaypublic StateServerException(StatusCodes statusCode, java.lang.Throwable cause)
statusCode
- the status code returned from the servercause
- the original exceptionpublic StateServerException(StatusCodes statusCode, java.lang.String message, java.lang.Throwable cause)
statusCode
- the status code returned from the servermessage
- the message to displaycause
- the original exceptionpublic StatusCodes getStatusCode()
protected int getCreatedOnThread()
public StateServerException reWrap(StateServerException e)
Rewrap existing an StateServerException with a new one if the thread the initial exception was generated on is different from the current thread.
The exception stack trace stops at the initial method of the current thread. If this exception came from a different thread, we won't see the call stack that initiated the request. So, we rethrow the same exception with the same message and status, nesting the original exception within so that we can see a full stack trace.reWrap
in interface ReWrappableException<StateServerException>
e
- the original StateServerException