From d35a37a449d31e6f4b43b937abf7b0e1fc497828 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Thu, 16 Jun 2016 20:21:25 +0300 Subject: Grammar now uses reverse polish notation --- main/exception/ExceptionManager.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'main/exception/ExceptionManager.java') diff --git a/main/exception/ExceptionManager.java b/main/exception/ExceptionManager.java index 0ceb25b..dbb59d3 100644 --- a/main/exception/ExceptionManager.java +++ b/main/exception/ExceptionManager.java @@ -16,13 +16,9 @@ public class ExceptionManager { return instance; } - public static void raise(InterpreterException.Exception ex, int line, List args) { - InterpreterException e = new InterpreterException(ex); - String output = e.what(); - for (String arg : args) { - output = String.format(output, arg); - } - System.err.println(String.format("[%s] line: %d %s", ex.toString(), line, output)); + public static void raise(InterpreterException.ExceptionType ex, int line, List args) throws InterpreterException { + InterpreterException e = new InterpreterException(ex, line, args); + throw e; } -- cgit v1.3