Always log exception in DevSupportManager
Reviewed By: andreicoman11 Differential Revision: D3741763 fbshipit-source-id: b4cc32e4d237955ec4a67af323024acd0d19106a
This commit is contained in:
parent
2a7f4be8f8
commit
e4d5dcb15b
|
@ -234,8 +234,8 @@ public class DevSupportManagerImpl implements DevSupportManager {
|
|||
@Override
|
||||
public void handleException(Exception e) {
|
||||
if (mIsDevSupportEnabled) {
|
||||
FLog.e(ReactConstants.TAG, "Exception in native call from JS", e);
|
||||
if (e instanceof JSException) {
|
||||
FLog.e(ReactConstants.TAG, "Exception in native call from JS", e);
|
||||
// TODO #11638796: convert the stack into something useful
|
||||
showNewError(e.getMessage() + "\n\n" + ((JSException) e).getStack(), new StackFrame[] {},
|
||||
JSEXCEPTION_ERROR_COOKIE, ErrorType.JS);
|
||||
|
@ -249,6 +249,7 @@ public class DevSupportManagerImpl implements DevSupportManager {
|
|||
|
||||
@Override
|
||||
public void showNewJavaError(String message, Throwable e) {
|
||||
FLog.e(ReactConstants.TAG, "Exception in native call", e);
|
||||
showNewError(message, StackTraceHelper.convertJavaStackTrace(e), JAVA_ERROR_COOKIE, ErrorType.NATIVE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue