| 196 | } |
| 197 | |
| 198 | bool IsPyError(const Status& status) { |
| 199 | if (status.ok()) { |
| 200 | return false; |
| 201 | } |
| 202 | auto detail = status.detail(); |
| 203 | bool result = detail != nullptr && detail->type_id() == kErrorDetailTypeId; |
| 204 | return result; |
| 205 | } |
| 206 | |
| 207 | void RestorePyError(const Status& status) { |
| 208 | ARROW_CHECK(IsPyError(status)); |