aboutsummaryrefslogtreecommitdiff
path: root/exc.h
diff options
context:
space:
mode:
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);
};