Include exception message in stack trace.

This commit is contained in:
Cody Henthorne
2021-12-20 12:16:05 -05:00
committed by Greyson Parrelli
parent 09a3391761
commit eaf72b194f
3 changed files with 35 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package org.thoughtcrime.securesms.util;
import androidx.annotation.NonNull;
import org.signal.core.util.ExceptionUtil;
import org.signal.core.util.logging.Log;
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
import org.thoughtcrime.securesms.keyvalue.SignalStore;
@@ -20,7 +21,7 @@ public class SignalUncaughtExceptionHandler implements Thread.UncaughtExceptionH
@Override
public void uncaughtException(@NonNull Thread t, @NonNull Throwable e) {
if (e instanceof OnErrorNotImplementedException) {
if (e instanceof OnErrorNotImplementedException && e.getCause() != null) {
e = e.getCause();
}
@@ -28,6 +29,6 @@ public class SignalUncaughtExceptionHandler implements Thread.UncaughtExceptionH
SignalStore.blockUntilAllWritesFinished();
Log.blockUntilAllWritesFinished();
ApplicationDependencies.getJobManager().flush();
originalHandler.uncaughtException(t, e);
originalHandler.uncaughtException(t, ExceptionUtil.joinStackTraceAndMessage(e));
}
}