MCPcopy
hub / github.com/wavetermdev/waveterm / renderErrorComponent

Function renderErrorComponent

tsunami/engine/errcomponent.go:13–22  ·  view source on GitHub ↗

creates an error component for display when a component panics

(componentName string, errorMsg string)

Source from the content-addressed store, hash-verified

11
12// creates an error component for display when a component panics
13func renderErrorComponent(componentName string, errorMsg string) any {
14 return vdom.H("div", map[string]any{
15 "className": "p-4 border border-red-500 bg-red-100 text-red-800 rounded font-mono",
16 },
17 vdom.H("div", map[string]any{
18 "className": "font-bold mb-2",
19 }, fmt.Sprintf("Component Error: %s", componentName)),
20 vdom.H("div", nil, errorMsg),
21 )
22}

Callers 1

callCFuncWithErrorGuardFunction · 0.85

Calls 1

HFunction · 0.92

Tested by

no test coverage detected