show soft errors as redboxes in dev

Summary: These are generally things sent to console.error

Reviewed By: lexs

Differential Revision: D3445393

fbshipit-source-id: e76e82dbaa32dc71100ae6b1d721f80007d8cd3a
This commit is contained in:
Felix Oghina 2016-06-17 03:24:46 -07:00 committed by Facebook Github Bot 1
parent 477cc52945
commit d78602b8cd
1 changed files with 5 additions and 1 deletions

View File

@ -80,8 +80,12 @@ public class ExceptionsManagerModule extends BaseJavaModule {
@ReactMethod @ReactMethod
public void reportSoftException(String title, ReadableArray details, int exceptionId) { public void reportSoftException(String title, ReadableArray details, int exceptionId) {
if (mDevSupportManager.getDevSupportEnabled()) {
mDevSupportManager.showNewJSError(title, details, exceptionId);
} else {
FLog.e(ReactConstants.TAG, stackTraceToString(title, details)); FLog.e(ReactConstants.TAG, stackTraceToString(title, details));
} }
}
private void showOrThrowError(String title, ReadableArray details, int exceptionId) { private void showOrThrowError(String title, ReadableArray details, int exceptionId) {
if (mDevSupportManager.getDevSupportEnabled()) { if (mDevSupportManager.getDevSupportEnabled()) {