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

Method ErrorStack

extension/goext/error.go:83–90  ·  view source on GitHub ↗

ErrorStack returns formatted full error stack message

()

Source from the content-addressed store, hash-verified

81
82// ErrorStack returns formatted full error stack message
83func (e Error) ErrorStack() string {
84 switch e.Err.(type) {
85 case *Error:
86 return fmt.Sprintf("HTTP %d (%s) at %s from", e.Status, http.StatusText(e.Status), e.Origin) + walkErrorStack(e.Err.(*Error))
87 default:
88 return fmt.Sprintf("HTTP %d (%s) at %s: %+v", e.Status, http.StatusText(e.Status), e.Origin, e.Err)
89 }
90}
91
92func walkErrorStack(e *Error) string {
93 if e == nil {

Callers 2

error_test.goFile · 0.80
dumpStackTraceFunction · 0.80

Calls 1

walkErrorStackFunction · 0.85

Tested by

no test coverage detected