QtRestClient  3.0.0
A library for generic JSON-based REST-APIs, with a mechanism to map JSON to Qt objects
Public Member Functions | List of all members
QtRestClient::GenericAwaitedException< ErrorClassType > Class Template Reference

An exception that is throw on errors when awaiting a GenericRestReply. More...

#include <restreplyawaitable.h>

+ Inheritance diagram for QtRestClient::GenericAwaitedException< ErrorClassType >:

Public Member Functions

 GenericAwaitedException (int code, const ErrorClassType &data)
 Constructor, takes an error code, type and additional data.
 
 GenericAwaitedException (int code, RestReply::Error type, const QString &data)
 Constructor, takes an error code, type and an error string.
 
ErrorClassType genericError () const
 Returns the additional error data.
 
QString errorString (const std::function< QString(ErrorClassType, int)> &failureTransformer) const
 Converts the error data to a string using the transformer if neccessary and returns it.
 
Q_NORETURN void raise () const override
 Inherits QException::raise.
 
ExceptionBaseclone () const override
 Inherits QException::clone.
 
QString errorString () const
 Converts the error data to a string and returns it.
 
QString errorString (const std::function< QString(QVariantMap, int)> &failureTransformer) const
 Converts the error data to a string using the transformer if neccessary and returns it.
 
QString errorString (const std::function< QString(QVariantList, int)> &failureTransformer) const
 Converts the error data to a string using the transformer if neccessary and returns it.
 
- Public Member Functions inherited from QtRestClient::AwaitedException
 AwaitedException (int code, RestReply::Error type, QVariant data)
 Constructor, takes an error code, type and additional data.
 
int errorCode () const
 Returns the error code.
 
RestReply::Error errorType () const
 Returns the error type.
 
QVariant errorData () const
 Returns the additional error data.
 
QVariantMap errorObject () const
 Converts the error data to a map and returns it.
 
QVariantList errorArray () const
 Converts the error data to a list and returns it.
 
QString errorString () const
 Converts the error data to a string and returns it.
 
QString errorString (const std::function< QString(QVariantMap, int)> &failureTransformer) const
 Converts the error data to a string using the transformer if neccessary and returns it.
 
QString errorString (const std::function< QString(QVariantList, int)> &failureTransformer) const
 Converts the error data to a string using the transformer if neccessary and returns it.
 
const char * what () const noexcept override
 Inherits QException::what.
 

Detailed Description

template<typename ErrorClassType = QObject*>
class QtRestClient::GenericAwaitedException< ErrorClassType >

An exception that is throw on errors when awaiting a GenericRestReply.

Definition at line 101 of file restreplyawaitable.h.


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