This commit is contained in:
Chenwenxuan
2024-03-06 14:54:30 +08:00
commit edac2715f0
1525 changed files with 809982 additions and 0 deletions

View 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