package no.topi.fiken.display; import android.util.Log; public class ExceptionHandler implements Thread.UncaughtExceptionHandler { private final static String TAG = DefaultDisplayService.class.getSimpleName(); public static final ExceptionHandler EXCEPTION_HANDLER = new ExceptionHandler(); @Override public void uncaughtException(Thread thread, Throwable ex) { Log.e(TAG, "Uncaught", ex); if (ex instanceof RuntimeException) { throw (RuntimeException) ex; } if (ex instanceof Error) { throw (Error) ex; } throw new RuntimeException(ex); } }