Add new error codes to MatrixAPIError

This commit is contained in:
Gergely Polonkai 2016-01-12 11:53:55 +01:00
parent 37b1742462
commit b11d5b2eb5
2 changed files with 7 additions and 1 deletions

View File

@ -44,6 +44,10 @@
* missing/invalid token, or using a bad
* password during login)
* @MATRIX_API_ERROR_UNKNOWN: an error unknown to the Matrix server
* @MATRIX_API_ERROR_UNKNOWN_TOKEN: the token provided is not known
* for the homeserver
* @MATRIX_API_ERROR_UNSPECIFIED: no error code was sent by the
* homeserver
* @MATRIX_API_ERROR_UNKNOWN_ERROR: an error unknown to this library
*
* Value mappings from Matrix.org API error codes

View File

@ -36,10 +36,12 @@ typedef enum {
MATRIX_API_ERROR_MISSING_TOKEN = 500,
MATRIX_API_ERROR_FORBIDDEN,
MATRIX_API_ERROR_UNKNOWN,
MATRIX_API_ERROR_UNKNOWN_TOKEN,
/* Allow for a lot of Matrix.org defined codes
Do not define error codes after this! */
MATRIX_API_ERROR_UNKNOWN_ERROR = 16384
MATRIX_API_ERROR_UNSPECIFIED = 16383,
MATRIX_API_ERROR_UNKNOWN_ERROR
} MatrixAPIError;
#define MATRIX_API_ERROR matrix_api_error_quark()