MCPcopy
hub / github.com/vuejs/core / tryWrap

Function tryWrap

packages/runtime-core/src/hmr.ts:204–216  ·  view source on GitHub ↗
(fn: (id: string, arg: any) => any)

Source from the content-addressed store, hash-verified

202}
203
204function tryWrap(fn: (id: string, arg: any) => any): Function {
205 return (id: string, arg: any) => {
206 try {
207 return fn(id, arg)
208 } catch (e: any) {
209 console.error(e)
210 console.warn(
211 `[HMR] Something went wrong during Vue component hot-reload. ` +
212 `Full reload required.`,
213 )
214 }
215 }
216}

Callers 1

hmr.tsFile · 0.85

Calls 3

errorMethod · 0.80
warnMethod · 0.80
fnFunction · 0.50

Tested by

no test coverage detected