MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / PrintError

Function PrintError

cmd/print.go:10–19  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

8)
9
10func PrintError(err error) {
11 if err == nil {
12 return
13 }
14 if JSONOutput {
15 printJSON(map[string]string{"error": err.Error()})
16 return
17 }
18 fmt.Fprintln(os.Stderr, tui.RenderError(err))
19}
20
21func FormatError(err error) string {
22 return tui.RenderError(err)

Callers 1

ExecuteFunction · 0.85

Calls 3

RenderErrorFunction · 0.92
printJSONFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected