Error represents a Python exception as a Go struct that implements the error interface. It allows Go code to handle Python exceptions in an idiomatic Go fashion.
| 15 | // error interface. It allows Go code to handle Python exceptions in an |
| 16 | // idiomatic Go fashion. |
| 17 | type Error struct { |
| 18 | Kind *Base |
| 19 | Value *Base |
| 20 | tb *C.PyObject |
| 21 | } |
| 22 | |
| 23 | func newError(kind, val *Base, tb *C.PyObject) *Error { |
| 24 | e := &Error{kind, val, tb} |
nothing calls this directly
no outgoing calls
no test coverage detected