Log more specific database exceptions.

This commit is contained in:
Greyson Parrelli
2021-10-19 16:38:08 -04:00
parent 13ef53372e
commit 00c131355f
2 changed files with 47 additions and 9 deletions

View File

@@ -54,6 +54,7 @@ import org.whispersystems.libsignal.util.guava.Optional;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.security.SecureRandom;
import java.util.ArrayList;
@@ -535,4 +536,10 @@ public class Util {
return primary;
}
public static @NonNull String convertThrowableToString(@NonNull Throwable throwable) {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
throwable.printStackTrace(new PrintStream(outputStream));
return outputStream.toString();
}
}