From 8f84c00978dc05007873a9fe1de6a18511dc3cf8 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Tue, 28 Jun 2016 21:09:43 +0300 Subject: Restructure project for use with maven --- .../jantuomi/borker/exception/ExceptionManager.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/com/jantuomi/borker/exception/ExceptionManager.java (limited to 'src/main/com/jantuomi/borker/exception/ExceptionManager.java') diff --git a/src/main/com/jantuomi/borker/exception/ExceptionManager.java b/src/main/com/jantuomi/borker/exception/ExceptionManager.java new file mode 100644 index 0000000..b9b302b --- /dev/null +++ b/src/main/com/jantuomi/borker/exception/ExceptionManager.java @@ -0,0 +1,21 @@ +package com.jantuomi.borker.exception; + +/** + * Created by jan on 10.6.2016. + */ +public class ExceptionManager { + + private static final ExceptionManager instance = new ExceptionManager(); + + private ExceptionManager() { + } + + public static ExceptionManager getInstance() { + return instance; + } + + public static void raise(InterpreterException.ExceptionType ex, int line, String... args) throws InterpreterException { + InterpreterException e = new InterpreterException(ex, line, args); + throw e; + } +} -- cgit v1.3