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

Function CheckPyError

python/pyarrow/src/arrow/python/common.h:49–55  ·  view source on GitHub ↗

Catch a pending Python exception and return the corresponding Status. If no exception is pending, Status::OK() is returned.

Source from the content-addressed store, hash-verified

47// Catch a pending Python exception and return the corresponding Status.
48// If no exception is pending, Status::OK() is returned.
49inline Status CheckPyError(StatusCode code = StatusCode::UnknownError) {
50 if (ARROW_PREDICT_TRUE(!PyErr_Occurred())) {
51 return Status::OK();
52 } else {
53 return ConvertPyError(code);
54 }
55}
56
57#define RETURN_IF_PYERROR() ARROW_RETURN_NOT_OK(CheckPyError())
58

Callers 15

GetFileInfoMethod · 0.85
CreateDirMethod · 0.85
DeleteDirMethod · 0.85
DeleteDirContentsMethod · 0.85
DeleteRootDirContentsMethod · 0.85
DeleteFileMethod · 0.85
MoveMethod · 0.85
CopyFileMethod · 0.85
OpenInputStreamMethod · 0.85
OpenInputFileMethod · 0.85
OpenOutputStreamMethod · 0.85
OpenAppendStreamMethod · 0.85

Calls 2

ConvertPyErrorFunction · 0.85
OKFunction · 0.50

Tested by 1

TestCheckPyErrorStatusFunction · 0.68