From 45a2b88d584fc8bdee1fbaf0def1d9b55ba26eff Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Tue, 21 Jun 2016 20:07:32 +0300 Subject: Added scopes, variables and functions --- main/exception/InterpreterException.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main/exception/InterpreterException.java') diff --git a/main/exception/InterpreterException.java b/main/exception/InterpreterException.java index 1565df9..8421edc 100644 --- a/main/exception/InterpreterException.java +++ b/main/exception/InterpreterException.java @@ -14,7 +14,8 @@ public class InterpreterException extends Exception { UnknownOperatorError, SyntaxError, TypeError, - ArgumentError + ArgumentError, + UndeclaredSymbolError } public static Map errorTexts = new HashMap<>(); @@ -25,6 +26,7 @@ public class InterpreterException extends Exception { errorTexts.put(ExceptionType.SyntaxError, "Unexpected %s."); errorTexts.put(ExceptionType.TypeError, "Incompatible types %s and %s."); errorTexts.put(ExceptionType.ArgumentError, "Function %s requires %s arguments."); + errorTexts.put(ExceptionType.UndeclaredSymbolError, "No symbol %s defined."); } private ExceptionType exceptionType; -- cgit v1.3