init
This commit is contained in:
33
device/exception/myexception.h
Normal file
33
device/exception/myexception.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user