Operator
C++ library for plugging into matrix.org
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
Operator::Error::MatrixError Class Referenceabstract

base error class for Matrix protocol errors. More...

#include <error.hh>

Inheritance diagram for Operator::Error::MatrixError:
Inheritance graph
[legend]
Collaboration diagram for Operator::Error::MatrixError:
Collaboration graph
[legend]

Public Types

typedef std::function< MatrixError *(unsigned short, const std::string &, const std::string &, std::map< std::string, nlohmann::json > &)> error_builder_t
 

Public Member Functions

virtual const std::string & getErrorCode () const =0
 
const std::string & getError () const
 
unsigned short getStatusCode () const
 
const std::map< std::string, nlohmann::json > & getData () const
 
std::string to_string () const
 

Static Public Member Functions

static ErrornewError (unsigned short status_code, const nlohmann::json &data) throw ()
 
static void registerErrorClass (const std::string &error_code, error_builder_t)
 
template<typename T >
static MatrixError_new_helper (unsigned short _status_code, const std::string &, const std::string &_error, std::map< std::string, nlohmann::json > &_other_data)
 

Static Public Attributes

static const char M_FORBIDDEN []
 
static const char M_UNKNOWN_TOKEN []
 
static const char M_BAD_JSON []
 
static const char M_NOT_JSON []
 
static const char M_NOT_FOUND []
 
static const char M_LIMIT_EXCEEDED []
 
static const char M_USER_IN_USE []
 
static const char M_INVALID_USERNAME []
 
static const char M_ROOM_IN_USE []
 
static const char M_BAD_PAGINATION []
 
static const char M_THREEPID_IN_USE []
 
static const char M_THREEPID_NOT_FOUND []
 
static const char M_SERVER_NOT_TRUSTED []
 
static const char M_WEAK_PASSWORD []
 
static const char M_UNKNOWN []
 
static const char M_EXCLUSIVE []
 
static const char M_MISSING_PARAM []
 

Protected Member Functions

 MatrixError (unsigned short _status_code, const std::string &_error, std::map< std::string, nlohmann::json > &_other_data)
 

Detailed Description

base error class for Matrix protocol errors.

See also
C-S r0.2.0 section 2

The documentation for this class was generated from the following files: