MCPcopy
hub / github.com/NervJS/nerv / errorCatcher

Function errorCatcher

packages/nerv/src/lifecycle.ts:30–36  ·  view source on GitHub ↗
(fn: Function, component: Component<any, any>)

Source from the content-addressed store, hash-verified

28const readyComponents: any[] = []
29
30export function errorCatcher (fn: Function, component: Component<any, any>) {
31 try {
32 return fn()
33 } catch (error) {
34 errorHandler(component, error)
35 }
36}
37
38function errorHandler (component: Component<any, any>, error) {
39 // if(!component) { throw error ; return }

Callers 11

attachFunction · 0.90
detachFunction · 0.90
mountComponentFunction · 0.85
renderComponentFunction · 0.85
flushMountFunction · 0.85
reRenderComponentFunction · 0.85
updateComponentFunction · 0.85
unmountComponentFunction · 0.85

Calls 2

fnFunction · 0.85
errorHandlerFunction · 0.85

Tested by

no test coverage detected