MCPcopy
hub / github.com/facebook/react / catch

Function catch

packages/react-reconciler/src/ReactFiberHooks.js:2482–2490  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

2480 try {
2481 state = useThenable(((actionResult: any): Thenable<Awaited<S>>));
2482 } catch (x) {
2483 if (x === SuspenseException) {
2484 // If we Suspend here, mark this separately so that we can track this
2485 // as an Action in Profiling tools.
2486 throw SuspenseActionException;
2487 } else {
2488 throw x;
2489 }
2490 }
2491 } else {
2492 state = (actionResult: any);
2493 }

Calls

no outgoing calls

Tested by

no test coverage detected