4 changed files with 124 additions and 19 deletions
@ -1,17 +1,24 @@ |
|||||
#ifndef HONAEXCEPTION_H |
#ifndef HONAEXCEPTION_H |
||||
#define HONAEXCEPTION_H |
#define HONAEXCEPTION_H |
||||
|
|
||||
#include <QObject> |
#include <QDebug> |
||||
|
#include <QString> |
||||
|
|
||||
class HonaException : public QObject |
class HonaException : public std::exception |
||||
{ |
{ |
||||
Q_OBJECT |
private: |
||||
public: |
QString _str; |
||||
explicit HonaException(QObject *parent = nullptr); |
|
||||
|
|
||||
signals: |
public: |
||||
|
HonaException(QString str) |
||||
|
{ |
||||
|
_str = str; |
||||
|
} |
||||
|
|
||||
public slots: |
virtual const char* what() const throw() |
||||
|
{ |
||||
|
return _str.toStdString().c_str(); |
||||
|
} |
||||
}; |
}; |
||||
|
|
||||
#endif //HONAEXCEPTION_H
|
#endif //HONAEXCEPTION_H
|
||||
|
@ -1,6 +0,0 @@ |
|||||
#include "../../../include/LowLevel/Exception/HonaException.h" |
|
||||
|
|
||||
HonaException::HonaException(QObject *parent) : QObject(parent) |
|
||||
{ |
|
||||
|
|
||||
} |
|
Loading…
Reference in new issue