aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/utils/ExceptionHelper.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-09 13:21:28 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-09 13:21:28 +0100
commitbaf0d6478750bb59e3f883fb7f814a92f27b8a29 (patch)
tree60652babff25bf35dd682540d655a28d8b9d78e1 /src/eu/siacs/conversations/utils/ExceptionHelper.java
parent05386b5052b29d47e7be2a5acc52fc524862e5a8 (diff)
exception handler
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/utils/ExceptionHelper.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/utils/ExceptionHelper.java b/src/eu/siacs/conversations/utils/ExceptionHelper.java
new file mode 100644
index 00000000..def184d0
--- /dev/null
+++ b/src/eu/siacs/conversations/utils/ExceptionHelper.java
@@ -0,0 +1,11 @@
+package eu.siacs.conversations.utils;
+
+import android.content.Context;
+
+public class ExceptionHelper {
+ public static void init(Context context) {
+ if(!(Thread.getDefaultUncaughtExceptionHandler() instanceof ExceptionHandler)) {
+ Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(context));
+ }
+ }
+}