1
0

Add ExceptionHandler

This commit is contained in:
Victor 2014-03-23 19:21:45 +02:00
parent 167ba12e50
commit effb0abea9

View File

@ -0,0 +1,25 @@
package com.annimon.turrets.util;
import com.annimon.turrets.Constants;
/**
* Handle exceptions.
* @author aNNiMON
*/
public class ExceptionHandler {
private static final boolean DEBUG_MODE = Constants.DEBUG_MODE;
public static void handle(Throwable throwable) {
if (DEBUG_MODE) {
throwable.printStackTrace();
}
}
public static void handle(Throwable throwable, String comment) {
if (DEBUG_MODE) {
System.out.println(comment);
handle(throwable);
}
}
}