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

Method ToCError

cpp/src/arrow/c/bridge.cc:2184–2200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2182
2183 private:
2184 int ToCError(const Status& status) {
2185 if (ARROW_PREDICT_TRUE(status.ok())) {
2186 private_data()->last_error_.clear();
2187 return 0;
2188 }
2189 private_data()->last_error_ = status.ToString();
2190 switch (status.code()) {
2191 case StatusCode::IOError:
2192 return EIO;
2193 case StatusCode::NotImplemented:
2194 return ENOSYS;
2195 case StatusCode::OutOfMemory:
2196 return ENOMEM;
2197 default:
2198 return EINVAL; // Fallback for Invalid, TypeError, etc.
2199 }
2200 }
2201
2202 PrivateData* private_data() {
2203 return reinterpret_cast<PrivateData*>(stream_->private_data);

Callers 2

StaticGetSchemaMethod · 0.95
StaticGetNextMethod · 0.95

Calls 4

okMethod · 0.45
clearMethod · 0.45
ToStringMethod · 0.45
codeMethod · 0.45

Tested by

no test coverage detected