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