MCPcopy
hub / github.com/google/go-jsonnet / Format

Method Format

error_formatter.go:65–74  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

63}
64
65func (ef *termErrorFormatter) Format(err error) string {
66 switch err := err.(type) {
67 case RuntimeError:
68 return ef.formatRuntime(&err)
69 case errors.StaticError:
70 return ef.formatStatic(err)
71 default:
72 return ef.formatInternal(err)
73 }
74}
75
76func (ef *termErrorFormatter) formatRuntime(err *RuntimeError) string {
77 return err.Error() + "\n" + ef.buildStackTrace(err.StackTrace)

Callers 2

TestMinimalErrorFunction · 0.95
runInternalJsonnetFunction · 0.95

Calls 3

formatRuntimeMethod · 0.95
formatStaticMethod · 0.95
formatInternalMethod · 0.95

Tested by 2

TestMinimalErrorFunction · 0.76
runInternalJsonnetFunction · 0.76