MCPcopy Create free account
hub / github.com/vitest-dev/vitest / onUnhandledError

Function onUnhandledError

packages/browser/src/node/rpc.ts:174–180  ·  view source on GitHub ↗
(error, type)

Source from the content-addressed store, hash-verified

172 sessions.getSession(options.sessionId)?.ready()
173 },
174 async onUnhandledError(error, type) {
175 if (error && typeof error === 'object') {
176 const _error = error as TestError
177 _error.stacks = globalServer.parseErrorStacktrace(_error)
178 }
179 vitest.state.catchError(error, type)
180 },
181 async onQueued(method, file) {
182 if (method === 'collect') {
183 vitest.state.collectFiles(project, [file])

Callers

nothing calls this directly

Calls 2

catchErrorMethod · 0.80
parseErrorStacktraceMethod · 0.45

Tested by

no test coverage detected