From d78602b8cdb54a2097034ad06e81ae88a56033e0 Mon Sep 17 00:00:00 2001 From: Felix Oghina Date: Fri, 17 Jun 2016 03:24:46 -0700 Subject: [PATCH] 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 --- .../react/modules/core/ExceptionsManagerModule.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/core/ExceptionsManagerModule.java b/ReactAndroid/src/main/java/com/facebook/react/modules/core/ExceptionsManagerModule.java index 337e3abfc..8deeee755 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/core/ExceptionsManagerModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/core/ExceptionsManagerModule.java @@ -80,7 +80,11 @@ public class ExceptionsManagerModule extends BaseJavaModule { @ReactMethod public void reportSoftException(String title, ReadableArray details, int exceptionId) { - FLog.e(ReactConstants.TAG, stackTraceToString(title, details)); + if (mDevSupportManager.getDevSupportEnabled()) { + mDevSupportManager.showNewJSError(title, details, exceptionId); + } else { + FLog.e(ReactConstants.TAG, stackTraceToString(title, details)); + } } private void showOrThrowError(String title, ReadableArray details, int exceptionId) {