MCPcopy
hub / github.com/caddyserver/caddy / Error

Method Error

modules/caddyhttp/errors.go:65–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63}
64
65func (e HandlerError) Error() string {
66 var s string
67 if e.ID != "" {
68 s += fmt.Sprintf("{id=%s}", e.ID)
69 }
70 if e.Trace != "" {
71 s += " " + e.Trace
72 }
73 if e.StatusCode != 0 {
74 s += fmt.Sprintf(": HTTP %d", e.StatusCode)
75 }
76 if e.Err != nil {
77 s += ": " + e.Err.Error()
78 }
79 return strings.TrimSpace(s)
80}
81
82// Unwrap returns the underlying error value. See the `errors` package for info.
83func (e HandlerError) Unwrap() error { return e.Err }

Callers 15

renewCertsMethod · 0.45
StartMethod · 0.45
TestKeyPair_LoadFunction · 0.45
CleanupMethod · 0.45
ServeHTTPMethod · 0.45
WithErrorMethod · 0.45
MatchWithErrorMethod · 0.45
MatchWithErrorMethod · 0.45
errLogValuesFunction · 0.45
MatchWithErrorMethod · 0.45
MatchWithErrorMethod · 0.45
MatchWithErrorMethod · 0.45

Calls

no outgoing calls

Tested by 15

TestKeyPair_LoadFunction · 0.36
TestImportFunction · 0.36
TestNestedIncludeFunction · 0.36
TestIncludeFunction · 0.36
TestFileListingFunction · 0.36
TestHumanizeFunction · 0.36
TestDialErrorBodyRetryFunction · 0.36
TestRoundRobinPolicyFunction · 0.36
TestLeastConnPolicyFunction · 0.36