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

Method Error

parser/error.go:159–167  ·  view source on GitHub ↗

Error implements the Error interface.

()

Source from the content-addressed store, hash-verified

157
158// Error implements the Error interface.
159func (self ErrorList) Error() string {
160 switch len(self) {
161 case 0:
162 return "no errors"
163 case 1:
164 return self[0].Error()
165 }
166 return fmt.Sprintf("%s (and %d more errors)", self[0].Error(), len(self)-1)
167}
168
169// Err returns an error equivalent to this ErrorList.
170// If the list is empty, Err returns nil.

Callers

nothing calls this directly

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected