MCPcopy Create free account
hub / github.com/dop251/goja / formatStack

Method formatStack

builtin_error.go:13–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13func (e *errorObject) formatStack() String {
14 var b StringBuilder
15 val := writeErrorString(&b, e.val)
16 if val != nil {
17 b.WriteString(val)
18 }
19 b.WriteRune('\n')
20
21 for _, frame := range e.stack {
22 b.writeASCII("\tat ")
23 frame.WriteToValueBuilder(&b)
24 b.WriteRune('\n')
25 }
26 return b.String()
27}
28
29func (e *errorObject) addStackProp() Value {
30 if !e.stackPropAdded {

Callers 1

addStackPropMethod · 0.95

Calls 6

WriteStringMethod · 0.95
WriteRuneMethod · 0.95
writeASCIIMethod · 0.95
StringMethod · 0.95
writeErrorStringFunction · 0.85
WriteToValueBuilderMethod · 0.80

Tested by

no test coverage detected