Catch Error, not just Exceptions in ErrorReportingRunnable

Summary: We can OOM in flipper, and we'd like to catch those and prevent them from crashing the app. They are Errors, not Exceptions.

Reviewed By: mweststrate

Differential Revision: D20648824

fbshipit-source-id: 60002a3c950518e56189776f05df8f2c92a851f0
This commit is contained in:
John Knox
2020-03-25 17:35:28 -07:00
committed by Facebook GitHub Bot
parent a30d5f3e60
commit 84e9756b83

View File

@@ -22,7 +22,7 @@ public abstract class ErrorReportingRunnable implements Runnable {
public final void run() {
try {
runOrThrow();
} catch (Exception e) {
} catch (Throwable e) {
if (mConnection != null) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);