Qx v0.5.7
Qt Extensions Library
Loading...
Searching...
No Matches
qx-abstracterror.h File Reference

The qx-abstracterror.h header file provides access to the base class from which custom error types should be extended for the Error interface. More...

#include "qx/core/qx_core_export.h"
#include <array>
#include <concepts>
#include <QString>
#include <QHash>
#include <QSet>
#include "qx/core/qx-global.h"
#include "qx/utility/qx-stringliteral.h"
Include dependency graph for qx-abstracterror.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Qx::AbstractError< EName, ECode >
 The AbstractError template class completes the Error interface and acts as the base class from which specific error types are implemented. More...
 
class  Qx::IError
 IError defines the baseline inheritance interface for Qx error types. More...
 

Namespaces

namespace  Qx
 The Qx namespace is the main namespace through which all non-global functionality of the Qx library is accessed.
 

Concepts

concept  Qx::error_type
 Specifies that a type is a Qx error type.
 
concept  Qx::error_adapter
 Specifies that a type is a Qx error adapter.
 
concept  Qx::error_adaptation
 Specifies that two types form a Qx error adaptation.
 

Macros

#define QX_ERROR_TYPE(Type, Name, Code)    Type final : public Qx::AbstractError<Name, Code>
 

Macro Definition Documentation

◆ QX_ERROR_TYPE

#define QX_ERROR_TYPE ( Type,
Name,
Code )    Type final : public Qx::AbstractError<Name, Code>

This macro declares a new Qx Error Type for the most common use-case.

Declares an error of type Type with name Name and type code Code. The class is marked final and inherits from AbstractError publically.

class QX_ERROR_TYPE(MyError, "MyError", 1020)
{
//..
}
The AbstractError template class completes the Error interface and acts as the base class from which ...
Definition qx-abstracterror.h:86
virtual quint32 deriveValue() const
Definition qx-abstracterror.cpp:78
virtual QString derivePrimary() const
Definition qx-abstracterror.cpp:113
The qx-abstracterror.h header file provides access to the base class from which custom error types sh...
#define QX_ERROR_TYPE(Type, Name, Code)
Definition qx-abstracterror.h:164