|
libfuoten 0.8.2
Qt based library to access the Nextcloud News App API.
|
Provides information about occurred errors. More...
#include <Fuoten/Error>
Public Types | |
| enum | Severity : quint8 { Nothing = 0 , Warning = 1 , Critical = 2 , Fatal = 3 } |
| Defines the severity of the error. More... | |
| enum | Type : quint8 { NoError = 0 , RequestError = 1 , JSONParsingError = 2 , InputError = 3 , OutputError = 4 , ServerError = 5 , ApplicationError = 6 , StorageError = 7 , AuthorizationError = 8 } |
| Defines the error type. More... | |
Properties | |
| QString | data |
| Additional error data. | |
| Fuoten::Error::Severity | severity |
| The severity of the error. | |
| QString | text |
| Text describing the error in a human readable way. | |
| Fuoten::Error::Type | type |
| Type of the error. | |
Public Member Functions | |
| Error (const QSqlError &sqlError, const QString &errorText=QString(), QObject *parent=nullptr) | |
| Constructs a new Error object from a QSqlError. | |
| Error (QJsonParseError jsonError, QObject *parent=nullptr) | |
| Constructs a new Error object form a QJsonParseError. | |
| Error (QNetworkReply *reply, QObject *parent=nullptr) | |
| Constructs a new Error object from a QNetworkReply. | |
| Error (QObject *parent=nullptr) | |
| Constructs a new empty Error object. | |
| Error (Type errorType, Severity errorSeverity, const QString &errorText, const QString &errorData, QObject *parent=nullptr) | |
| Constructs a new Error object from the given arguments. | |
| ~Error () override | |
| Deconstructs the Error object. | |
| QString | data () const |
| Returns additional error data. | |
| void | setData (const QString &nData) |
| Sets additional error data. | |
| void | setSeverity (Severity nSeverity) |
| Sets the error severity. | |
| void | setText (const QString &nText) |
| Sets the human readable text. | |
| void | setType (Type nType) |
| Sets the error type. | |
| Severity | severity () const |
| Returns the error severity. | |
| QString | text () const |
| Returns the error text. | |
| Type | type () const |
| Returns the error type. | |
Signals | |
| void | dataChanged (const QString &data) |
| This signal is emitted if the additional data changes. | |
| void | severityChanged (Fuoten::Error::Severity severity) |
| This signal is emitted if the severity changes. | |
| void | textChanged (const QString &text) |
| This signal is emitted if the error text changes. \ſa text. | |
| void | typeChanged (Fuoten::Error::Type type) |
| This signal is emitted if the error type changes. | |
Provides information about occurred errors.
| enum Fuoten::Error::Severity : quint8 |
| enum Fuoten::Error::Type : quint8 |
Defines the error type.
|
read |
Additional error data.
| QString | data() const |
| void | dataChanged(const QString &data) |
|
read |
The severity of the error.
| Severity | severity() const |
| void | severityChanged(Severity severity) |
|
read |
Text describing the error in a human readable way.
| QString | text() const |
| void | textChanged(const QString &text) |
|
read |
| Error::Error | ( | Type | errorType, |
| Severity | errorSeverity, | ||
| const QString & | errorText, | ||
| const QString & | errorData, | ||
| QObject * | parent = nullptr ) |
Constructs a new Error object from the given arguments.
|
explicit |
Constructs a new Error object from a QNetworkReply.
| Error::Error | ( | QJsonParseError | jsonError, |
| QObject * | parent = nullptr ) |
Constructs a new Error object form a QJsonParseError.
|
override |
Deconstructs the Error object.
|
signal |
This signal is emitted if the additional data changes.
| Error::Severity Error::severity | ( | ) | const |
Returns the error severity.
|
signal |
This signal is emitted if the severity changes.
|
signal |
This signal is emitted if the error text changes. \ſa text.
| Error::Type Error::type | ( | ) | const |
Returns the error type.
|
signal |
This signal is emitted if the error type changes.