1 #include "mathexpr-error.hpp"
3 mathexpr_error::mathexpr_error(errorcode _code
, const std::string
& message
)
4 : std::runtime_error(message
), code(_code
)
8 mathexpr_error::errorcode
mathexpr_error::get_code()
13 const char* mathexpr_error::get_short_error()
16 case UNDEFINED
: return "#Undefined";
17 case CIRCULAR
: return "#Circular";
18 case TYPE_MISMATCH
: return "#Type";
19 case INTERNAL
: return "#Internal";
20 case WDOMAIN
: return "#Domain";
21 case DIV_BY_0
: return "#Div-by-0";
22 case LOG_BY_0
: return "#Log-of-0";
23 case ARGCOUNT
: return "#Argcount";
24 case SIZE
: return "#Badsize";
25 case ADDR
: return "#Badaddr";
26 case FORMAT
: return "#Badformat";
27 case UNKNOWN
: return "#???";
28 default: return "#Unknownerr";