Render better crash stack traces for executors.

This commit is contained in:
Greyson Parrelli
2021-11-03 10:11:22 -04:00
parent af1b9579b4
commit c06fb81490
11 changed files with 141 additions and 49 deletions

View File

@@ -7,9 +7,9 @@ import androidx.annotation.NonNull;
import net.zetetic.database.DatabaseErrorHandler;
import net.zetetic.database.sqlcipher.SQLiteDatabase;
import org.signal.core.util.ExceptionUtil;
import org.signal.core.util.logging.Log;
import org.thoughtcrime.securesms.util.CursorUtil;
import org.thoughtcrime.securesms.util.Util;
/**
* The default error handler wipes the file. This one instead prints some diagnostics and then crashes so the original corrupt file isn't lost.
@@ -45,7 +45,7 @@ public final class SqlCipherErrorHandler implements DatabaseErrorHandler {
}
} catch (Throwable t) {
output.append("Failed to do integrity_check!").append("\n")
.append(Util.convertThrowableToString(t));
.append(ExceptionUtil.convertThrowableToString(t));
}
output.append("\n").append("===== PRAGMA cipher_integrity_check =====").append("\n");
@@ -56,7 +56,7 @@ public final class SqlCipherErrorHandler implements DatabaseErrorHandler {
}
} catch (Throwable t) {
output.append("Failed to do cipher_integrity_check!").append("\n")
.append(Util.convertThrowableToString(t));
.append(ExceptionUtil.convertThrowableToString(t));
}
Log.e(TAG, output.toString());