Qx v0.5.8
Qt Extensions Library
Loading...
Searching...
No Matches
qx-internalerror.h
1// Shared Lib Support
2#include "qx/core/qx_core_export.h"
3
4// Intra-component Includes
6
8namespace QxPrivate
9{
10
11// Basically a copy of GenericError for internal use only
12class QX_CORE_EXPORT InternalError final : public Qx::AbstractError<"Qx::InternalError", 0>
13{
14//-Public Variables------------------------------------------------------------------------------------------
15public:
16 enum Value
17 {
18 VAL_SSL_ERR = 1
19 };
20
21//-Instance Members------------------------------------------------------------------------------------------
22private:
23 quint32 mValue;
24 Qx::Severity mSeverity;
25 QString mCaption;
26 QString mPrimary;
27 QString mSecondary;
28 QString mDetails;
29
30//-Constructor----------------------------------------------------------------------------------------------
31public:
33 InternalError(Qx::Severity severity, quint32 value, const QString& primary,
34 const QString& secondary = {}, const QString& details = {}, const QString& caption = {});
35
36//-Instance Functions----------------------------------------------------------------------------------------------
37private:
38 quint32 deriveValue() const override;
39 Qx::Severity deriveSeverity() const override;
40 QString deriveCaption() const override;
41 QString derivePrimary() const override;
42 QString deriveSecondary() const override;
43 QString deriveDetails() const override;
44
45public:
46 bool isValid() const;
47 quint32 value() const;
48 Qx::Severity severity() const;
49 QString caption() const;
50 QString primary() const;
51 QString secondary() const;
52 QString details() const;
53
54 InternalError& setSeverity(Qx::Severity sv);
55 InternalError withSeverity(Qx::Severity sv);
56 InternalError& setCaption(const QString& caption);
57 InternalError& setPrimary(const QString& primary);
58 InternalError& setSecondary(const QString& secondary);
59 InternalError& setDetails(const QString& details);
60};
61
62}
The AbstractError template class completes the Error interface and acts as the base class from which ...
Definition qx-abstracterror.h:86
Severity
Definition qx-global.h:11
InternalError
The qx-abstracterror.h header file provides access to the base class from which custom error types sh...