react-code-dataset / next.js /packages /next /src /client /react-client-callbacks /report-global-error.ts
Download next.js/packages/next/src/client/react-client-callbacks/report-global-error.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 321 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/client/react-client-callbacks/report-global-error.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/client/react-client-callbacks/report-global-error.ts
-
curl -L -o report-global-error.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/client/react-client-callbacks/report-global-error.ts
321 Bytes
| export const reportGlobalError = | |
| typeof reportError === 'function' | |
| ? // In modern browsers, reportError will dispatch an error event, | |
| // emulating an uncaught JavaScript error. | |
| reportError | |
| : (error: unknown) => { | |
| // TODO: Dispatch error event | |
| globalThis.console.error(error) | |
| } | |