aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/com/jantuomi/tunkki/exception/ExceptionManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/com/jantuomi/tunkki/exception/ExceptionManager.java')
-rw-r--r--src/main/com/jantuomi/tunkki/exception/ExceptionManager.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/com/jantuomi/tunkki/exception/ExceptionManager.java b/src/main/com/jantuomi/tunkki/exception/ExceptionManager.java
new file mode 100644
index 0000000..7c7a6b5
--- /dev/null
+++ b/src/main/com/jantuomi/tunkki/exception/ExceptionManager.java
@@ -0,0 +1,21 @@
+package com.jantuomi.tunkki.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(BorkError.ExceptionType ex, int line, String... args) throws BorkError {
+ BorkError e = new BorkError(ex, line, args);
+ throw e;
+ }
+}