public class AblyException
extends java.lang.Exception
| Constructor and Description |
|---|
AblyException(ErrorInfo reason)
Constructor for use where there is an ErrorInfo available
|
AblyException(java.lang.String reason,
int statusCode,
int code)
Constructor for use where there is a specific reason code available
|
AblyException(java.lang.Throwable cause)
Constructor for use where the exception wasn't
anticipated at a lower level
|
| Modifier and Type | Method and Description |
|---|---|
static AblyException |
fromError(ErrorInfo error)
Get an exception from a response body with error details
|
static AblyException |
fromIOException(java.io.IOException ioe)
Get an exception from an IOException occurring locally
|
static AblyException |
fromJSON(byte[] jsonBytes)
Get an exception from a response body with error details as byte[]
|
static AblyException |
fromJSON(java.lang.String jsonText)
Get an exception from a response body with error details
|
static AblyException |
fromResponseStatus(java.lang.String statusLine,
int statusCode)
Get an exception from an error response that does not contain
a response body with error details
|
static AblyException |
fromThrowable(java.lang.Throwable t)
Get an exception from a throwable occurring locally
|
public ErrorInfo errorInfo
public AblyException(java.lang.Throwable cause)
public AblyException(ErrorInfo reason)
public AblyException(java.lang.String reason,
int statusCode,
int code)
public static AblyException fromJSON(java.lang.String jsonText) throws AblyException
jsonText - AblyExceptionpublic static AblyException fromError(ErrorInfo error) throws AblyException
jsonText - AblyExceptionpublic static AblyException fromJSON(byte[] jsonBytes)
jsonBytes - public static AblyException fromIOException(java.io.IOException ioe)
ioe - public static AblyException fromResponseStatus(java.lang.String statusLine, int statusCode)
statusLine - statusCode - public static AblyException fromThrowable(java.lang.Throwable t)
t -