MCPcopy
hub / github.com/go-chi/chi / PrintPrettyStack

Function PrintPrettyStack

middleware/recoverer.go:54–64  ·  view source on GitHub ↗
(rvr interface{})

Source from the content-addressed store, hash-verified

52var recovererErrorWriter io.Writer = os.Stderr
53
54func PrintPrettyStack(rvr interface{}) {
55 debugStack := debug.Stack()
56 s := prettyStack{}
57 out, err := s.parse(debugStack, rvr)
58 if err == nil {
59 recovererErrorWriter.Write(out)
60 } else {
61 // print stdlib output as a fallback
62 os.Stderr.Write(debugStack)
63 }
64}
65
66type prettyStack struct {
67}

Callers 2

PanicMethod · 0.85
RecovererFunction · 0.85

Calls 2

parseMethod · 0.95
WriteMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…