MCPcopy Create free account
hub / github.com/buke/quickjs-go / Error

Method Error

error.go:15–21  ·  view source on GitHub ↗

Error implements the error interface.

()

Source from the content-addressed store, hash-verified

13
14// Error implements the error interface.
15func (err *Error) Error() string {
16 msg := fmt.Sprintf("%s: %s", err.Name, err.Message)
17 if err.Cause != "" {
18 return fmt.Sprintf("%s (cause: %s)", msg, err.Cause)
19 }
20 return msg
21}

Callers 6

TestErrorBasicsFunction · 0.95
TestErrorStandardTypesFunction · 0.95
TestErrorAsGoInterfaceFunction · 0.95
TestValueErrorFunction · 0.95

Calls

no outgoing calls

Tested by 6

TestErrorBasicsFunction · 0.76
TestErrorStandardTypesFunction · 0.76
TestErrorAsGoInterfaceFunction · 0.76
TestValueErrorFunction · 0.76