Move ErrorHandlers to react-native/src/private (#45876)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45876

Changelog: [internal]

Reviewed By: dmytrorykun

Differential Revision: D60597776

fbshipit-source-id: 1093aee0f2b84312b55a2b0c22e2b1576c60e26e
This commit is contained in:
Rubén Norte
2024-08-02 10:19:49 -07:00
committed by Facebook GitHub Bot
parent e14b5f1d6f
commit ed63646fc2
3 changed files with 6 additions and 25 deletions
@@ -20,7 +20,7 @@ import {
onCaughtError,
onRecoverableError,
onUncaughtError,
} from '../Core/ErrorHandlers';
} from '../../src/private/renderer/errorhandling/ErrorHandlers';
import {type RootTag} from './RootTag';
export function renderElement({
element,
@@ -4287,26 +4287,6 @@ declare module.exports: symbolicateStackTrace;
"
`;
exports[`public API should not change unintentionally Libraries/Core/ErrorHandlers.js 1`] = `
"type ErrorInfo = {
+componentStack?: ?string,
+errorBoundary?: ?React$Component<any, any>,
};
declare export function onUncaughtError(
errorValue: mixed,
errorInfo: ErrorInfo
): void;
declare export function onCaughtError(
errorValue: mixed,
errorInfo: ErrorInfo
): void;
declare export function onRecoverableError(
errorValue: mixed,
errorInfo: ErrorInfo
): void;
"
`;
exports[`public API should not change unintentionally Libraries/Core/ExceptionsManager.js 1`] = `
"declare class SyntheticError extends Error {
name: string;
@@ -8,11 +8,12 @@
* @flow strict
*/
'use strict';
import type {ExtendedError} from '../../../../Libraries/Core/ExtendedError';
import type {ExtendedError} from './ExtendedError';
import {SyntheticError, handleException} from './ExceptionsManager';
import {
SyntheticError,
handleException,
} from '../../../../Libraries/Core/ExceptionsManager';
type ErrorInfo = {
+componentStack?: ?string,