aboutsummaryrefslogtreecommitdiff
path: root/exc.h
diff options
context:
space:
mode:
authorTeddy <ted.sybil@gmail.com>2013-08-05 19:49:31 +0800
committerTeddy <ted.sybil@gmail.com>2013-08-05 19:49:31 +0800
commita6574b0025b68eb28a8c7d679ca6783132ad013d (patch)
tree09f8e9976e209c9e7bf48556e8d90f211c1b3464 /exc.h
parent5dba94ed1eec7a808cab022a23480b4d39518307 (diff)
complex, real, rational, integral number support
Diffstat (limited to 'exc.h')
-rw-r--r--exc.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/exc.h b/exc.h
index 7a6879d..dc380d3 100644
--- a/exc.h
+++ b/exc.h
@@ -10,26 +10,21 @@ using std::string;
* The top-level exception
*/
class GeneralError {
- public:
- virtual string get_msg() = 0; /**< Extract error message */
-};
-
-class SyntaxError : public GeneralError {
protected:
string msg; /**< Error mesg */
ErrCode code; /**< Error code */
public:
- SyntaxError(ErrCode code); /**< Construct an SyntaxError */
+ GeneralError(ErrCode code); /**< Construct a General Error */
string get_msg(); /**< Get the error message */
};
-class TokenError : public SyntaxError {
+class TokenError : public GeneralError {
public:
TokenError(string token, ErrCode code); /**< Construct an TokenError */
};
-class NormalError : public SyntaxError {
+class NormalError : public GeneralError {
public:
NormalError(ErrCode code);
};