aboutsummaryrefslogtreecommitdiff
path: root/exc.cpp
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.cpp
parent5dba94ed1eec7a808cab022a23480b4d39518307 (diff)
complex, real, rational, integral number support
Diffstat (limited to 'exc.cpp')
-rw-r--r--exc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/exc.cpp b/exc.cpp
index 648326e..167bf92 100644
--- a/exc.cpp
+++ b/exc.cpp
@@ -1,16 +1,16 @@
#include "exc.h"
#include <cstdio>
-SyntaxError::SyntaxError(ErrCode _code) : code(_code) {}
+GeneralError::GeneralError(ErrCode _code) : code(_code) {}
-string SyntaxError::get_msg() { return this->msg; }
+string GeneralError::get_msg() { return this->msg; }
-TokenError::TokenError(string token, ErrCode code) : SyntaxError(code) {
+TokenError::TokenError(string token, ErrCode code) : GeneralError(code) {
static char buffer[1024]; // should be enough
- sprintf(buffer, SYN_ERR_MSG[code], token.c_str());
+ sprintf(buffer, ERR_MSG[code], token.c_str());
msg = buffer;
}
-NormalError::NormalError(ErrCode code) : SyntaxError(code) {
- msg = SYN_ERR_MSG[code];
+NormalError::NormalError(ErrCode code) : GeneralError(code) {
+ msg = ERR_MSG[code];
}