Adding Soft Error Logging to FallbackJSBundleLoader

Reviewed By: michalgr

Differential Revision: D4405355

fbshipit-source-id: 7730a1afd74ace7fdad91b22f9254e83d16d1050
This commit is contained in:
Ashok Menon
2017-01-13 03:58:47 -08:00
committed by Facebook Github Bot
parent c3892fa871
commit 87c6bcb65d
6 changed files with 214 additions and 2 deletions
@@ -32,4 +32,3 @@ android_library(
'PUBLIC',
],
)
@@ -14,6 +14,8 @@ import java.util.List;
import java.util.ListIterator;
import java.util.Stack;
import com.facebook.common.logging.FLog;
/**
* FallbackJSBundleLoader
*
@@ -24,6 +26,7 @@ import java.util.Stack;
public final class FallbackJSBundleLoader extends JSBundleLoader {
/* package */ static final String RECOVERABLE = "facebook::react::Recoverable";
/* package */ static final String TAG = "FallbackJSBundleLoader";
// Loaders to delegate to, with the preferred one at the top.
private Stack<JSBundleLoader> mLoaders;
@@ -60,7 +63,7 @@ public final class FallbackJSBundleLoader extends JSBundleLoader {
mLoaders.pop();
mRecoveredErrors.add(e);
// TODO (t14839302): Report a soft error for each swallowed exception.
FLog.wtf(TAG, "Falling back from recoverable error", e);
}
}
}