MCPcopy
hub / github.com/prisma/prisma / handleFormatPanic

Function handleFormatPanic

packages/internals/src/engine-commands/formatSchema.ts:63–80  ·  view source on GitHub ↗
(tryCb: () => T)

Source from the content-addressed store, hash-verified

61}
62
63function handleFormatPanic<T>(tryCb: () => T) {
64 try {
65 return tryCb()
66 } catch (e: unknown) {
67 const { message, stack } = getWasmError(e as WasmPanic)
68 debug(`Error formatting schema: ${message}`)
69 debug(stack)
70
71 const panic = new RustPanic(
72 /* message */ message,
73 /* rustStack */ stack,
74 /* request */ '@prisma/prisma-schema-wasm format',
75 ErrorArea.FMT_CLI,
76 )
77
78 throw panic
79 }
80}
81
82type DocumentUri = string
83

Callers 1

formatSchemaFunction · 0.85

Calls 2

getWasmErrorFunction · 0.90
debugFunction · 0.85

Tested by

no test coverage detected