aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/utils/ExceptionHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/utils/ExceptionHelper.java')
-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 000000000..def184d0d
--- /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));
+ }
+ }
+}