mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Revert D40387938: 4/n Display a RedBox with the JS stack (instead of native stack) when an unhandled JS exceptions occurs
Differential Revision: D40387938 (https://github.com/facebook/react-native/commit/ff398e4e2632ece8a6f22d744e96e489ca3b9d92) Original commit changeset: 2abea657476d Original Phabricator Diff: D40387938 (https://github.com/facebook/react-native/commit/ff398e4e2632ece8a6f22d744e96e489ca3b9d92) fbshipit-source-id: 0b5dbe417abf25d5723c70337189dfb42570e56d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
48db6be269
commit
9e68eea2c8
@@ -17,10 +17,8 @@ namespace react {
|
||||
|
||||
using facebook::react::JSErrorHandlerKey;
|
||||
|
||||
MapBuffer JsErrorHandler::parseErrorStack(
|
||||
const jsi::JSError &error,
|
||||
bool isFatal,
|
||||
bool isHermes) {
|
||||
static MapBuffer
|
||||
parseErrorStack(const jsi::JSError &error, bool isFatal, bool isHermes) {
|
||||
/**
|
||||
* This parses the different stack traces and puts them into one format
|
||||
* This borrows heavily from TraceKit (https://github.com/occ/TraceKit)
|
||||
@@ -101,7 +99,7 @@ JsErrorHandler::~JsErrorHandler() {}
|
||||
void JsErrorHandler::handleJsError(const jsi::JSError &error, bool isFatal) {
|
||||
// TODO: Current error parsing works and is stable. Can investigate using
|
||||
// REGEX_HERMES to get additional Hermes data, though it requires JS setup.
|
||||
MapBuffer errorMap = JsErrorHandler::parseErrorStack(error, isFatal, false);
|
||||
MapBuffer errorMap = parseErrorStack(error, isFatal, false);
|
||||
_jsErrorHandlingFunc(std::move(errorMap));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user