1 
2 #ifndef WK_PARSE_EXCEPTION_H
3 #define WK_PARSE_EXCEPTION_H
4 
5 #include <string>
6 #include <stdexcept>
7 
8 class WKParseException: public std::runtime_error {
9 public:
10   static const int CODE_UNSPECIFIED = 0;
WKParseException(int code)11   WKParseException(int code): std::runtime_error(""), exceptionCode(code) {}
WKParseException(std::string message)12   WKParseException(std::string message): std::runtime_error(message), exceptionCode(CODE_UNSPECIFIED) {}
13 
code()14   int code() {
15     return this->exceptionCode;
16   }
17 
18 private:
19   int exceptionCode;
20 };
21 
22 #endif
23