The qx-error.h header file provides access to the Error interface.
#include "qx/core/qx_core_export.h"
#include <QHash>
#include <QMetaType>
#include <QTextStream>
#include "qx/core/qx-abstracterror.h"
Go to the source code of this file.
|
namespace | Qx |
| The Qx namespace is the main namespace through which all non-global functionality of the Qx library is accessed.
|
|
◆ QX_DECLARE_ERROR_ADAPTATION
#define QX_DECLARE_ERROR_ADAPTATION |
( |
| Adaptable, |
|
|
| Adapter ) |
Value:
"and be constructable from Adaptable."); \
template<> \
struct QxErrorPrivate::adapter_registry<Adaptable> { typedef Adapter adapter; };
Specifies that two types form a Qx error adaptation.
Definition qx-abstracterror.h:145
This macro registers Adapter as an Error Adapter for the type Adaptable. Adaptable and Adapter together must satisfy the error_adaptation constraint.
◆ operator<<()
QX_CORE_EXPORT QTextStream & operator<< |
( |
QTextStream & | ts, |
|
|
const Qx::Error & | e ) |
Writes the error e to the stream ts.
The error is written in a human-readable format, structured by its properties. A new line is always started after the error is written.
- See also
- postError().
ge.setValue(50);
ge.setDetailed("- Issue 1\n- Issue2\n- Issue3");
QTextStream ts;