1#ifndef PARSEEXCEPTIONS_H
2#define PARSEEXCEPTIONS_H
16 : std::runtime_error(
"") {
23 const char*
what() const noexcept
override {
24 return "Divide Zero is not permitted!";
39 (
"Meeting unsolved symbol: " + symbol).toStdString()) {
46 const char*
what() const noexcept
override {
47 return std::runtime_error::what();
61 "Meeting InvalidNumber!") {
68 const char*
what() const noexcept
override {
69 return std::runtime_error::what();
83 "UnSymmetry Expression!") {
90 const char*
what() const noexcept
override {
91 return std::runtime_error::what();
104 : std::runtime_error(
105 "Some Parse Error!") {
112 const char*
what() const noexcept
override {
113 return std::runtime_error::what();
127 : std::runtime_error(
128 (
"Meeting unsolved function: " + symbol).toStdString()) {
135 const char*
what() const noexcept
override {
136 return std::runtime_error::what();
149 : std::runtime_error(
150 "value sqrt is less then 0, which is not allowed!") {
157 const char*
what() const noexcept
override{
158 return std::runtime_error::what();
Exception thrown when a square root operation receives a negative value.
Definition ParseExceptions.h:143
BadSqrtValue()
Constructs a BadSqrtValue exception.
Definition ParseExceptions.h:148
const char * what() const noexcept override
Returns the error message.
Definition ParseExceptions.h:157
Exception thrown when a division by zero is attempted.
Definition ParseExceptions.h:10
const char * what() const noexcept override
Returns the error message.
Definition ParseExceptions.h:23
DivideZeroException()
Constructs a DivideZeroException with a predefined message.
Definition ParseExceptions.h:15
General-purpose exception thrown during parse errors not covered by other exceptions.
Definition ParseExceptions.h:98
GeneralParseError()
Constructs a GeneralParseError exception.
Definition ParseExceptions.h:103
const char * what() const noexcept override
Returns the error message.
Definition ParseExceptions.h:112
Exception thrown when an invalid number is detected.
Definition ParseExceptions.h:54
const char * what() const noexcept override
Returns the error message.
Definition ParseExceptions.h:68
InvalidNumber()
Constructs an InvalidNumber exception.
Definition ParseExceptions.h:59
Exception thrown when an unsupported symbol is encountered during parsing.
Definition ParseExceptions.h:31
UnSupportedSymbol(const QString symbol)
Constructs the exception with the unsupported symbol.
Definition ParseExceptions.h:37
const char * what() const noexcept override
Returns the error message.
Definition ParseExceptions.h:46
Exception thrown when an unsupported function is encountered during parsing.
Definition ParseExceptions.h:120
const char * what() const noexcept override
Returns the error message.
Definition ParseExceptions.h:135
UnSupportiveFunction(const QString symbol)
Constructs the exception with the unsupported function name.
Definition ParseExceptions.h:126
Exception thrown when an expression has unbalanced parentheses or structure.
Definition ParseExceptions.h:76
const char * what() const noexcept override
Returns the error message.
Definition ParseExceptions.h:90
UnSymmetryExpression()
Constructs an UnSymmetryExpression exception.
Definition ParseExceptions.h:81