From a6574b0025b68eb28a8c7d679ca6783132ad013d Mon Sep 17 00:00:00 2001 From: Teddy Date: Mon, 5 Aug 2013 19:49:31 +0800 Subject: complex, real, rational, integral number support --- exc.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'exc.h') 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); }; -- cgit v1.2.3