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