@@ -53,23 +53,18 @@ public static void enable(BacktraceClient client) {
53
53
public void uncaughtException (final Thread thread , final Throwable throwable ) {
54
54
OnServerResponseEventListener callback = getCallbackToDefaultHandler (thread , throwable );
55
55
56
- if (throwable instanceof Exception ) {
57
- BacktraceLogger .e (LOG_TAG , "Sending uncaught exception to Backtrace API" , throwable );
58
- BacktraceReport report = new BacktraceReport ((Exception ) throwable , BacktraceExceptionHandler .customAttributes );
59
- report .attributes .put (BacktraceAttributeConsts .ErrorType , BacktraceAttributeConsts .UnhandledExceptionAttributeType );
60
- this .client .send (report , callback );
61
- BacktraceLogger .d (LOG_TAG , "Uncaught exception sent to Backtrace API" );
62
- }
63
- BacktraceLogger .d (LOG_TAG , "Default uncaught exception handler" );
56
+ BacktraceLogger .e (LOG_TAG , "Sending uncaught exception to Backtrace API" , throwable );
57
+ BacktraceReport report = new BacktraceReport ((Exception ) throwable , BacktraceExceptionHandler .customAttributes );
58
+ report .attributes .put (BacktraceAttributeConsts .ErrorType , BacktraceAttributeConsts .UnhandledExceptionAttributeType );
59
+ this .client .send (report , callback );
60
+ BacktraceLogger .d (LOG_TAG , "Uncaught exception sent to Backtrace API" );
61
+
64
62
try {
65
63
signal .await ();
66
64
} catch (Exception ex ) {
67
65
BacktraceLogger .e (LOG_TAG , "Exception during waiting for response" , ex );
68
66
}
69
- }
70
-
71
- private boolean isMainThread () {
72
- return Looper .myLooper () == Looper .getMainLooper ();
67
+ BacktraceLogger .d (LOG_TAG , "Default uncaught exception handler" );
73
68
}
74
69
75
70
private OnServerResponseEventListener getCallbackToDefaultHandler (final Thread thread , final Throwable throwable ) {
0 commit comments