MCPcopy Create free account
hub / github.com/reactjs/react-rails / invokeGuardedCallback

Function invokeGuardedCallback

lib/assets/react-source/development/react.js:3984–3988  ·  view source on GitHub ↗

* Call a function while guarding against errors that happens within it. * Returns an error if it throws, otherwise null. * * In production, this is implemented using a try-catch. The reason we don't * use a try-catch directly is so that we can swap out a different * implementation in DEV m

(name, func, context, a, b, c, d, e, f)

Source from the content-addressed store, hash-verified

3982 */
3983
3984 function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
3985 hasError = false;
3986 caughtError = null;
3987 invokeGuardedCallbackImpl$1.apply(reporter, arguments);
3988 }
3989 /**
3990 * Same as invokeGuardedCallback, but instead of returning an error, it stores
3991 * it in a global so it can be rethrown by `rethrowCaughtError` later.

Callers 6

safelyDetachRefFunction · 0.85
safelyCallDestroyFunction · 0.85
commitRootImplFunction · 0.85
flushPassiveEffectsImplFunction · 0.85
react.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected