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

Method ToCError

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

Source from the content-addressed store, hash-verified

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