diff options
author | Teddy <[email protected]> | 2013-08-05 19:49:31 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2013-08-05 19:49:31 +0800 |
commit | a6574b0025b68eb28a8c7d679ca6783132ad013d (patch) | |
tree | 09f8e9976e209c9e7bf48556e8d90f211c1b3464 /exc.h | |
parent | 5dba94ed1eec7a808cab022a23480b4d39518307 (diff) |
complex, real, rational, integral number support
Diffstat (limited to 'exc.h')
-rw-r--r-- | exc.h | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -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); }; |