MCPcopy Create free account
hub / github.com/devld/go-drive / errorMessage

Function errorMessage

script/runtime.go:159–167  ·  view source on GitHub ↗
(e any)

Source from the content-addressed store, hash-verified

157}
158
159func errorMessage(e any) string {
160 if re, ok := e.(err.Error); ok {
161 return fmt.Sprintf("E:%s:%d:%s", re.Name(), re.Code(), re.Error())
162 }
163 if ee, ok := e.(error); ok {
164 return ee.Error()
165 }
166 return fmt.Sprintf("%v", e)
167}
168
169func (v *VM) ThrowTypeError(message string) {
170 panic(v.o.MakeTypeError(message))

Callers 1

ThrowDetachedErrorFunction · 0.85

Calls 3

NameMethod · 0.65
CodeMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected