diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2016-06-28 21:39:10 +0300 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2016-07-26 19:47:13 +0300 |
| commit | 9c189c2d1ef35184ec9a9d08bdeeb52936902867 (patch) | |
| tree | 48f1edea6c6c0c2a55f161c35ee8556063b10273 /src/main/com/jantuomi/borker/exception | |
| parent | 8f84c00978dc05007873a9fe1de6a18511dc3cf8 (diff) | |
Restructure classes
Diffstat (limited to 'src/main/com/jantuomi/borker/exception')
| -rw-r--r-- | src/main/com/jantuomi/borker/exception/BorkError.java (renamed from src/main/com/jantuomi/borker/exception/InterpreterException.java) | 4 | ||||
| -rw-r--r-- | src/main/com/jantuomi/borker/exception/ExceptionManager.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/com/jantuomi/borker/exception/InterpreterException.java b/src/main/com/jantuomi/borker/exception/BorkError.java index 153da0a..a9edb20 100644 --- a/src/main/com/jantuomi/borker/exception/InterpreterException.java +++ b/src/main/com/jantuomi/borker/exception/BorkError.java @@ -7,7 +7,7 @@ import java.util.Map; /** * Created by jan on 12.6.2016. */ -public class InterpreterException extends Exception { +public class BorkError extends Exception { public enum ExceptionType { IllegalTokenError, @@ -30,7 +30,7 @@ public class InterpreterException extends Exception { private ExceptionType exceptionType; private String completeMessage; - public InterpreterException(ExceptionType exceptionType, int line, String... args) { + public BorkError(ExceptionType exceptionType, int line, String... args) { super(exceptionType.toString(), null, false, false); this.exceptionType = exceptionType; this.completeMessage = formatMessage(exceptionType.toString() + ": " + what(exceptionType), line, args); diff --git a/src/main/com/jantuomi/borker/exception/ExceptionManager.java b/src/main/com/jantuomi/borker/exception/ExceptionManager.java index b9b302b..238c341 100644 --- a/src/main/com/jantuomi/borker/exception/ExceptionManager.java +++ b/src/main/com/jantuomi/borker/exception/ExceptionManager.java @@ -14,8 +14,8 @@ public class ExceptionManager { return instance; } - public static void raise(InterpreterException.ExceptionType ex, int line, String... args) throws InterpreterException { - InterpreterException e = new InterpreterException(ex, line, args); + public static void raise(BorkError.ExceptionType ex, int line, String... args) throws BorkError { + BorkError e = new BorkError(ex, line, args); throw e; } } |
