-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexprtkexceptions.hpp
50 lines (40 loc) · 990 Bytes
/
exprtkexceptions.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef EXPRTKEXCEPTIONS_H
#define EXPRTKEXCEPTIONS_H
#include <QException>
class ExprTkDivByZeroException : public QException
{
public:
ExprTkDivByZeroException() {}
const char* what() const throw() override
{
return "Error: Could not divide by zero.";
}
};
class ExprTkParseException : public QException
{
public:
ExprTkParseException() {}
const char* what() const throw() override
{
return "Error: Could not parse an expression.";
}
};
class ExprTkImaginaryException : public QException
{
public:
ExprTkImaginaryException() {}
const char* what() const throw() override
{
return "Error: The result is imaginary and is not supported.";
}
};
class ExprTkOverflowException : public QException
{
public:
ExprTkOverflowException() {}
const char* what() const throw() override
{
return "Error: The result will overflow a double, if you can believe it.";
}
};
#endif // EXPRTKEXCEPTIONS_H