Lua: Fix type confusion between signed and unsigned
[lsnes.git] / include / library / mathexpr-error.hpp
blobdb580c8f99fc15050efa552039b789f24c139fff
1 #ifndef _library__mathexpr_error__hpp__included__
2 #define _library__mathexpr_error__hpp__included__
4 #include <string>
5 #include <stdexcept>
7 namespace mathexpr
9 class error : public std::runtime_error
11 public:
12 enum errorcode
14 UNDEFINED, //Evaluation encountered undefined value.
15 CIRCULAR, //Evaluation encountered circular reference.
16 TYPE_MISMATCH, //Evaluation encountered mismatching types.
17 INTERNAL, //Evaluation encountered internal error.
18 WDOMAIN, //Evaluation encountered domain error.
19 DIV_BY_0, //Evaluation encountered division by zero.
20 LOG_BY_0, //Evaluation encountered logarithm of zero.
21 ARGCOUNT, //Evaluation encountered wrong argument count.
22 SIZE, //Bad size for memory watch.
23 ADDR, //Bad address for memory watch.
24 FORMAT, //Bad format string.
25 UNKNOWN, //Unknown error.
27 error(errorcode code, const std::string& message);
28 errorcode get_code();
29 const char* get_short_error();
30 private:
31 errorcode code;
35 #endif