| 304 | } |
| 305 | |
| 306 | std::string StripContext(const std::string& message) { |
| 307 | #ifdef ARROW_EXTRA_ERROR_CONTEXT |
| 308 | auto pos = message.find_first_of('\n'); |
| 309 | if (pos != message.npos) { |
| 310 | return message.substr(0, pos); |
| 311 | } |
| 312 | #endif |
| 313 | return message; |
| 314 | } |
| 315 | |
| 316 | TEST(StatusTest, ReturnIfNotOk) { |
| 317 | auto f = [](auto v) { |