componentDidCatch()

in packages/react/react-portal/src/ErrorBoundary.tsx [40:52]


  componentDidCatch(error: Error, errorInfo: ErrorInfo) {
    // Display fallback UI
    this.setState({ hasError: true, error });
    // You can also log the error to an error reporting service
    if (this.props.logger) {
      this.props.logger.error(error, errorInfo);
    } else {
      // @ts-ignore
      window.__bl && window.__bl.error && window.__bl.error(error, errorInfo);
    }

    this.props.appDidCatch && this.props.appDidCatch(error);
  }