MCPcopy Create free account
hub / github.com/apache/arrow / ConvertPyError

Function ConvertPyError

python/pyarrow/src/arrow/python/common.cc:187–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185// Python exception <-> Status
186
187Status ConvertPyError(StatusCode code) {
188 auto detail = PythonErrorDetail::FromPyError();
189 if (code == StatusCode::UnknownError) {
190 code = MapPyError(detail->exc_type());
191 }
192
193 std::string message;
194 RETURN_NOT_OK(internal::PyObject_StdStringStr(detail->exc_value(), &message));
195 return Status(code, message, detail);
196}
197
198bool IsPyError(const Status& status) {
199 if (status.ok()) {

Callers 8

TestRestorePyErrorBasicsFunction · 0.85
InitMethod · 0.85
SerializeExtInstanceFunction · 0.85
DeserializeMethod · 0.85
SetInstanceMethod · 0.85
CheckPyErrorFunction · 0.85

Calls 5

MapPyErrorFunction · 0.85
PyObject_StdStringStrFunction · 0.85
exc_typeMethod · 0.80
exc_valueMethod · 0.80
StatusClass · 0.70

Tested by 2

TestRestorePyErrorBasicsFunction · 0.68