MCPcopy Create free account
hub / github.com/goplus/py / Error

Method Error

error.go:46–52  ·  view source on GitHub ↗

Error() returns a string representation of the Python exception represented by the Error e. This is the same as the final line of the Python output from an uncaught exception.

()

Source from the content-addressed store, hash-verified

44// by the Error e. This is the same as the final line of the Python output from
45// an uncaught exception.
46func (e *Error) Error() string {
47 kind := e.Kind.String()
48 if strings.HasPrefix(kind, "<type 'exceptions.") {
49 kind = kind[18:len(kind)-2]
50 }
51 return kind + ": " + e.Value.String()
52}
53
54/*
55// Matches returns true if e.Kind matches the exception in exc. If exc is a

Callers

nothing calls this directly

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected