| 48 | |
| 49 | template <typename CONTEXT_FUNC> |
| 50 | gboolean |
| 51 | check(GError **error, const arrow::Status &status, CONTEXT_FUNC &&context_func) |
| 52 | { |
| 53 | if (status.ok()) { |
| 54 | return TRUE; |
| 55 | } else { |
| 56 | std::string context = context_func(); |
| 57 | g_set_error(error, |
| 58 | GARROW_ERROR, |
| 59 | garrow_error_from_status(status), |
| 60 | "%s: %s", |
| 61 | context.c_str(), |
| 62 | status.ToString().c_str()); |
| 63 | return FALSE; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | template <typename TYPE> |
| 68 | gboolean |