Public Member Functions | |
ApiException (int code, String message) | |
ApiException (int code, String message, Throwable cause) | |
ApiException (JsonNode node) | |
int | getCode () |
String | getDisplayableMessage () |
String | getHint () |
Static Public Member Functions | |
static String | getError (int error) |
static String | getHint (int error) |
Static Public Attributes | |
static final int | API_ERROR = 0x0c |
static final String | EXTRA_ERROR_CODE = "org.xbmc.android.jsonprc.extra.ERROR_CODE" |
static final String | EXTRA_ERROR_HINT = "org.xbmc.android.jsonprc.extra.ERROR_HINT" |
static final String | EXTRA_ERROR_MESSAGE = "org.xbmc.android.jsonprc.extra.ERROR_MESSAGE" |
static final int | HTTP_BAD_REQUEST = 0x13 |
static final int | HTTP_CLIENT_ERROR = 0x11 |
static final int | HTTP_FORBIDDEN = 0x15 |
static final int | HTTP_INFO = 0x0e |
static final int | HTTP_NOT_FOUND = 0x16 |
static final int | HTTP_REDIRECTION = 0x10 |
static final int | HTTP_SERVER_ERROR = 0x12 |
static final int | HTTP_SUCCESS = 0x0f |
static final int | HTTP_UNAUTHORIZED = 0x14 |
static final int | HTTP_UNKNOWN = 0x0d |
static final int | IO_DISCONNECTED = 0x08 |
static final int | IO_EXCEPTION = 0x02 |
static final int | IO_EXCEPTION_WHILE_OPENING = 0x05 |
static final int | IO_EXCEPTION_WHILE_READING = 0x03 |
static final int | IO_EXCEPTION_WHILE_WRITING = 0x04 |
static final int | IO_SOCKETTIMEOUT = 0x06 |
static final int | IO_UNKNOWN_HOST = 0x07 |
static final int | JSON_EXCEPTION = 0x0a |
static final int | MALFORMED_URL = 0x01 |
static final int | RESPONSE_ERROR = 0x0b |
static final int | UNSUPPORTED_ENCODING = 0x09 |
Private Attributes | |
int | code |
Static Private Attributes | |
static final long | serialVersionUID = -8668163106123710291L |
Stuff that breaks while accessing the API
Definition at line 32 of file ApiException.java.
org.xbmc.android.jsonrpc.io.ApiException.ApiException | ( | int | code, |
String | message | ||
) | [inline] |
Definition at line 129 of file ApiException.java.
org.xbmc.android.jsonrpc.io.ApiException.ApiException | ( | int | code, |
String | message, | ||
Throwable | cause | ||
) | [inline] |
Definition at line 135 of file ApiException.java.
org.xbmc.android.jsonrpc.io.ApiException.ApiException | ( | JsonNode | node | ) | [inline] |
Definition at line 141 of file ApiException.java.
int org.xbmc.android.jsonrpc.io.ApiException.getCode | ( | ) | [inline] |
Definition at line 159 of file ApiException.java.
String org.xbmc.android.jsonrpc.io.ApiException.getDisplayableMessage | ( | ) | [inline] |
Returns a "user friendly" error message that can be displayed to end users.
c | Application context |
Definition at line 168 of file ApiException.java.
static String org.xbmc.android.jsonrpc.io.ApiException.getError | ( | int | error | ) | [inline, static] |
Definition at line 182 of file ApiException.java.
String org.xbmc.android.jsonrpc.io.ApiException.getHint | ( | ) | [inline] |
Returns a user friendly suggestion why the error happened.
c | Application context |
Definition at line 178 of file ApiException.java.
static String org.xbmc.android.jsonrpc.io.ApiException.getHint | ( | int | error | ) | [inline, static] |
Definition at line 226 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.API_ERROR = 0x0c [static] |
JSON-RPC returned an error.
Definition at line 81 of file ApiException.java.
int org.xbmc.android.jsonrpc.io.ApiException.code [private] |
Definition at line 127 of file ApiException.java.
final String org.xbmc.android.jsonrpc.io.ApiException.EXTRA_ERROR_CODE = "org.xbmc.android.jsonprc.extra.ERROR_CODE" [static] |
Definition at line 123 of file ApiException.java.
final String org.xbmc.android.jsonrpc.io.ApiException.EXTRA_ERROR_HINT = "org.xbmc.android.jsonprc.extra.ERROR_HINT" [static] |
Definition at line 125 of file ApiException.java.
final String org.xbmc.android.jsonrpc.io.ApiException.EXTRA_ERROR_MESSAGE = "org.xbmc.android.jsonprc.extra.ERROR_MESSAGE" [static] |
Definition at line 124 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.HTTP_BAD_REQUEST = 0x13 [static] |
Bad request HTTP code received (400).
Definition at line 109 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.HTTP_CLIENT_ERROR = 0x11 [static] |
Client error HTTP code received (400 - 499).
Definition at line 101 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.HTTP_FORBIDDEN = 0x15 [static] |
Forbidden HTTP code received (403).
Definition at line 117 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.HTTP_INFO = 0x0e [static] |
Informational HTTP code received (100 - 199).
Definition at line 89 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.HTTP_NOT_FOUND = 0x16 [static] |
Not found HTTP code received (404).
Definition at line 121 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.HTTP_REDIRECTION = 0x10 [static] |
Redirection HTTP code received (300 - 399).
Definition at line 97 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.HTTP_SERVER_ERROR = 0x12 [static] |
Server error HTTP code received (500 - 599).
Definition at line 105 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.HTTP_SUCCESS = 0x0f [static] |
Success HTTP code received (200 - 299).
Definition at line 93 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.HTTP_UNAUTHORIZED = 0x14 [static] |
Unauthorized HTTP code received (401).
Definition at line 113 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.HTTP_UNKNOWN = 0x0d [static] |
Unknown HTTP status code received (not in between 100 and 599).
Definition at line 85 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.IO_DISCONNECTED = 0x08 [static] |
Connection was terminated unexpectedly.
Definition at line 65 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.IO_EXCEPTION = 0x02 [static] |
Connection problem, please check logs.
Definition at line 41 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.IO_EXCEPTION_WHILE_OPENING = 0x05 [static] |
Error while connecting to server.
Definition at line 53 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.IO_EXCEPTION_WHILE_READING = 0x03 [static] |
Data could not been read from server.
Definition at line 45 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.IO_EXCEPTION_WHILE_WRITING = 0x04 [static] |
Data could not been sent to server.
Definition at line 49 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.IO_SOCKETTIMEOUT = 0x06 [static] |
Connection timed out.
Definition at line 57 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.IO_UNKNOWN_HOST = 0x07 [static] |
Host not found.
Definition at line 61 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.JSON_EXCEPTION = 0x0a [static] |
Error when serializing JSON data.
Definition at line 73 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.MALFORMED_URL = 0x01 [static] |
The URL of the API could not be parsed. See logs for more info.
Definition at line 37 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.RESPONSE_ERROR = 0x0b [static] |
Received different response than expected.
Definition at line 77 of file ApiException.java.
final long org.xbmc.android.jsonrpc.io.ApiException.serialVersionUID = -8668163106123710291L [static, private] |
Definition at line 270 of file ApiException.java.
final int org.xbmc.android.jsonrpc.io.ApiException.UNSUPPORTED_ENCODING = 0x09 [static] |
Unsupported encoding.
Definition at line 69 of file ApiException.java.