Chat Android SDK
7.0.1
|
Representation of a Chat Error object. More...
Public Member Functions | |
ErrorInfo (int errorCode, String errorMessage) | |
Create ErrorInfo from error code and corresponding message. More... | |
ErrorInfo (int errorStatus, int errorCode, String errorMessage) | |
Create ErrorInfo from status, error code and corresponding message. More... | |
int | getStatus () |
Get error category as a classifier. More... | |
int | getCode () |
Returns unique code for this error. More... | |
String | getMessage () |
Returns error message of this error. More... | |
String | toString () |
Convert ErrorInfo to string representation, for example for logging. More... | |
Static Public Attributes | |
static int | CLIENT_ERROR = 0 |
This status is set if error occured in the SDK and is not related to network operations. | |
static int | CANNOT_GET_MESSAGE_BY_INDEX = -4 |
This code is signaled to the listener of Messages::getMessageByIndex() if general error occurs and message could not be retrieved. | |
static int | MISMATCHING_TOKEN_UPDATE = -5 |
This code is signaled to the listener of ChatClient::updateToken() if updated token does not match the original token. More... | |
static int | CHANNEL_NOT_SYNCHRONIZED = -6 |
This code is signaled when an attempt is made to query channel members or messages without synchronizing first. | |
Representation of a Chat Error object.
This object encapsulates information about an SDK error and is passed around to listener callbacks.
com.twilio.chat.ErrorInfo.ErrorInfo | ( | int | errorCode, |
String | errorMessage | ||
) |
Create ErrorInfo from error code and corresponding message.
The status will be set to CLIENT_ERROR.
errorCode | Error code. |
errorMessage | Error description. |
com.twilio.chat.ErrorInfo.ErrorInfo | ( | int | errorStatus, |
int | errorCode, | ||
String | errorMessage | ||
) |
Create ErrorInfo from status, error code and corresponding message.
errorStatus | Error status code. |
errorCode | Error unique code. |
errorMessage | Error description. |
int com.twilio.chat.ErrorInfo.getCode | ( | ) |
Returns unique code for this error.
String com.twilio.chat.ErrorInfo.getMessage | ( | ) |
Returns error message of this error.
int com.twilio.chat.ErrorInfo.getStatus | ( | ) |
Get error category as a classifier.
Local client errors get status 0, network related errors have their HTTP error code as a status.
String com.twilio.chat.ErrorInfo.toString | ( | ) |
|
static |
This code is signaled to the listener of ChatClient::updateToken() if updated token does not match the original token.
This error often indicates that you have updated token with a different identity, which is not allowed - you cannot change client identity mid-flight.
If this error is returned, you should shutdown and re-create ChatClient.