|
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. More... | |
| Fuoten::Error::Severity | severity |
| The severity of the error. More... | |
| QString | text |
| Text describing the error in a human readable way. More... | |
| Fuoten::Error::Type | type |
| Type of the error. More... | |
Public Member Functions | |
| Error (QObject *parent=nullptr) | |
| Constructs a new empty Error object. More... | |
| Error (Type errorType, Severity errorSeverity, const QString &errorText, const QString &errorData, QObject *parent=nullptr) | |
| Constructs a new Error object from the given arguments. More... | |
| Error (QNetworkReply *reply, QObject *parent=nullptr) | |
| Constructs a new Error object from a QNetworkReply. More... | |
| Error (QJsonParseError jsonError, QObject *parent=nullptr) | |
| Constructs a new Error object form a QJsonParseError. More... | |
| Error (const QSqlError &sqlError, const QString &errorText=QString(), QObject *parent=nullptr) | |
| Constructs a new Error object from a QSqlError. More... | |
| ~Error () override | |
| Deconstructs the Error object. More... | |
| QString | data () const |
| Returns additional error data. More... | |
| void | setData (const QString &nData) |
| Sets additional error data. More... | |
| void | setSeverity (Severity nSeverity) |
| Sets the error severity. More... | |
| void | setText (const QString &nText) |
| Sets the human readable text. More... | |
| void | setType (Type nType) |
| Sets the error type. More... | |
| Severity | severity () const |
| Returns the error severity. More... | |
| QString | text () const |
| Returns the error text. More... | |
| Type | type () const |
| Returns the error type. More... | |
Signals | |
| void | dataChanged (const QString &data) |
| This signal is emitted if the additional data changes. More... | |
| void | severityChanged (Fuoten::Error::Severity severity) |
| This signal is emitted if the severity changes. More... | |
| void | textChanged (const QString &text) |
| This signal is emitted if the error text changes. \ſa text. More... | |
| void | typeChanged (Fuoten::Error::Type type) |
| This signal is emitted if the error type changes. More... | |
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.
|
signal |
This signal is emitted if the severity changes.
|
signal |
This signal is emitted if the error text changes. \ſa text.
|
signal |
This signal is emitted if the error type changes.
1.8.14