[ReactNative] ErrorUtils.reportError shouldn't redbox

Summary:
@public

ErrorUtils.reportError is intended for reporting handled errors to the
server, like timeouts, which means that we shouldn't shove them in the
developer's face.

Test Plan: add `require('ErrorUtils').reportError(new Error('error'))` and see a useful error message with stack but no redbox.  Debugger confirms `reportSoftException` is called but it doesn't do anything yet.  `reportFatalError` and throwing exceptions still show redboxes.
This commit is contained in:
Spencer Ahrens
2015-06-02 17:51:36 -07:00
parent d90999a989
commit d796584b6c
2 changed files with 3 additions and 4 deletions

View File

@@ -44,8 +44,7 @@ RCT_EXPORT_METHOD(reportSoftException:(NSString *)message
[_delegate handleSoftJSExceptionWithMessage:message stack:stack];
return;
}
[[RCTRedBox sharedInstance] showErrorMessage:message withStack:stack];
// JS already logs the error via console.
}
RCT_EXPORT_METHOD(reportFatalException:(NSString *)message