function showDialog$1(capturedError) {
  var componentStack = capturedError.componentStack,
    error = capturedError.error;

  var errorToHandle = void 0;

  // Typically Errors are thrown but eg strings or null can be thrown as well.
  if (error instanceof Error) {
    var message = error.message,
      name = error.name;

    var summary = message ? name + ": " + message : name;

    errorToHandle = error;

    try {
      errorToHandle.message =
        summary + "\n\nThis error is located at:" + componentStack;
    } catch (e) {}
  } else if (typeof error === "string") {
    errorToHandle = new Error(
      error + "\n\nThis error is located at:" + componentStack
    );
  } else {
    errorToHandle = new Error("Unspecified error at:" + componentStack);
  }

  ExceptionsManager.handleException(errorToHandle, false);

  // Return false here to prevent ReactFiberErrorLogger default behavior of
  // logging error details to console.error. Calls to console.error are
  // automatically routed to the native redbox controller, which we've already
  // done above by calling ExceptionsManager.
  return false;
}
Intercept lifecycle errors and ensure they are shown with the correct stack
trace within the native redbox component.