MCPcopy Create free account
hub / github.com/cloudwan/gohan / walkErrorStack

Function walkErrorStack

extension/goext/error.go:92–103  ·  view source on GitHub ↗
(e *Error)

Source from the content-addressed store, hash-verified

90}
91
92func walkErrorStack(e *Error) string {
93 if e == nil {
94 return ""
95 }
96
97 switch e.Err.(type) {
98 case *Error:
99 return fmt.Sprintf("\n <- HTTP %d (%s) at %s from", e.Status, http.StatusText(e.Status), e.Origin) + walkErrorStack(e.Err.(*Error))
100 default:
101 return fmt.Sprintf("\n <- HTTP %d (%s) at %s: %+v", e.Status, http.StatusText(e.Status), e.Origin, e.Err)
102 }
103}
104
105// 1xx
106func NewErrorContinue(err error) *Error { return NewError(http.StatusContinue, err) }

Callers 1

ErrorStackMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected