MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / FormatStack

Method FormatStack

errctx/context.go:72–82  ·  view source on GitHub ↗

FormatStack formats the stack trace into a single string.

()

Source from the content-addressed store, hash-verified

70
71// FormatStack formats the stack trace into a single string.
72func (ec *ErrorContext) FormatStack() string {
73 lines := make([]string, len(ec.stack))
74
75 for i, pc := range ec.stack {
76 f := runtime.FuncForPC(pc)
77 file, line := f.FileLine(pc)
78 lines[i] = fmt.Sprintf("%s:%d %s", file, line, f.Name())
79 }
80
81 return strings.Join(lines, "\n")
82}
83
84func (ec *ErrorContext) applyOptions(opts ...Option) *ErrorContext {
85 for _, opt := range opts {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected