diff --git a/compiler/ksp_compiler.py b/compiler/ksp_compiler.py index 1116085..f4f99de 100644 --- a/compiler/ksp_compiler.py +++ b/compiler/ksp_compiler.py @@ -224,6 +224,8 @@ def __init__(self, line, message): Exception.__init__(self, msg) self.line = line self.message = msg + # Save the original error message (without any context info) + self.error_message = message class Line: '''Line object used for handling lines before AST lex/yacc parsing''' @@ -2730,4 +2732,4 @@ def __repr__(self): utils.log_message("The output file for the compiled code was not defined, however compilation ended successfully in %s!" % delta) if __name__ == "__main__": - main() \ No newline at end of file + main()