MCPcopy
hub / github.com/react/create-react-app / tryCatch

Function tryCatch

packages/react-error-overlay/fixtures/bundle.mjs:19958–19964  ·  view source on GitHub ↗
(fn, obj, arg)

Source from the content-addressed store, hash-verified

19956 // only additional allocation required is the completion record, which
19957 // has a stable shape and so hopefully should be cheap to allocate.
19958 function tryCatch(fn, obj, arg) {
19959 try {
19960 return { type: "normal", arg: fn.call(obj, arg) };
19961 } catch (err) {
19962 return { type: "throw", arg: err };
19963 }
19964 }
19965
19966 var GenStateSuspendedStart = "suspendedStart";
19967 var GenStateSuspendedYield = "suspendedYield";

Callers 3

invokeFunction · 0.70
makeInvokeMethodFunction · 0.70
maybeInvokeDelegateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected