aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/com/jantuomi/tunkki/exception/ExceptionManager.java
blob: 9cfdd2e1b6e05a2e698d6a6fac01ce9fed0a8974 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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(TunkkiError.ExceptionType ex, int line, String... args) throws TunkkiError {
        TunkkiError e = new TunkkiError(ex, line, args);
        throw e;
    }
}