7#include "dtkcore_global.h"
43 , m_msg(std::move(e).m_msg)
52 DError(qint64 code,
const QString &msg) noexcept
64 DError(qint64 code, QString &&msg) noexcept
66 , m_msg(std::move(msg))
87 m_msg = std::move(e).m_msg;
130 friend bool operator==(
const DError &x,
const DError &y)
noexcept {
return x.m_code == y.m_code and x.m_msg == y.m_msg; }
142 debug <<
"Error Code:" << e.m_code <<
"Message:" << e.m_msg;
对于错误的包装类
Definition derror.h:16
void setErrorMessage(const QString &msg) &
设置错误信息
Definition derror.h:125
DError(qint64 code, QString &&msg) noexcept
构造函数
Definition derror.h:64
DError(DError &&e) noexcept
移动构造函数
Definition derror.h:41
QString getErrorMessage() const &&
获取错误信息
Definition derror.h:119
void setErrorCode(qint64 code) &noexcept
设置错误代码
Definition derror.h:106
DError & operator=(const DError &e)
重载拷贝赋值运算符
Definition derror.h:73
friend bool operator==(const DError &x, const DError &y) noexcept
重载相等运算符
Definition derror.h:130
friend QDebug operator<<(QDebug debug, const DError &e)
重载输出运算符
Definition derror.h:140
DError() noexcept
默认构造函数
Definition derror.h:22
DError & operator=(DError &&e)
重载移动赋值运算符
Definition derror.h:84
const QString & getErrorMessage() const &
获取错误信息
Definition derror.h:112
DError(qint64 code, const QString &msg) noexcept
构造函数
Definition derror.h:52
DError(const DError &e) noexcept
拷贝构造函数
Definition derror.h:31
qint64 getErrorCode() const noexcept
获取错误代码
Definition derror.h:100
friend bool operator!=(const DError &x, const DError &y) noexcept
重载不等运算符
Definition derror.h:135