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.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'exc.cpp') 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 -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]; } -- cgit v1.2.3