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.
()
| 44 | // by the Error e. This is the same as the final line of the Python output from |
| 45 | // an uncaught exception. |
| 46 | func (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 |