34 lines
849 B
C++
34 lines
849 B
C++
#ifndef MYEXCEPTION_H
|
|
#define MYEXCEPTION_H
|
|
#include <QString>
|
|
|
|
#define NOTHING 50000
|
|
enum ExceptLevel {MY_WARN,
|
|
MY_CRITICAL };
|
|
|
|
class MyException
|
|
{
|
|
public:
|
|
MyException(ExceptLevel value = MY_CRITICAL);
|
|
MyException(const QString& text,ExceptLevel value = MY_CRITICAL);
|
|
MyException(int exceptCodeValue,ExceptLevel value = MY_CRITICAL);
|
|
MyException(QString text,int exceptCodeValue,ExceptLevel value = MY_CRITICAL);
|
|
void setExceptLevel(ExceptLevel levelValue);
|
|
ExceptLevel getExceptLevel();
|
|
void setExceptInfo(QString text);
|
|
QString getExceptInfo();
|
|
QString getExceptInfoWithExceptCode();
|
|
int getExceptCode();
|
|
void setExceptCode(int value);
|
|
private:
|
|
QString getExceptCodeText();
|
|
|
|
private:
|
|
QString exceptInfo;
|
|
ExceptLevel level;
|
|
int exceptCode;
|
|
|
|
};
|
|
|
|
#endif // MYEXCEPTION_H
|