rok commented on pull request #10647:
URL: https://github.com/apache/arrow/pull/10647#issuecomment-900263546
Also I'm noticing we're doing this a lot:
```
const time_zone* tz;
try {
tz = locate_zone(timezone);
} catch (const std::runtime_error& ex) {
return Status::Invalid(ex.what());
}
```
Can we do something like:
```
Status LocateZone(std::string timezone, const time_zone* tz) {
try {
tz = locate_zone(timezone);
} catch (const std::runtime_error& ex) {
return Status::Invalid(ex.what());
}
return Status::OK();
}
const time_zone* tz;
RETURN_NOT_OK(LocateZone(timezone, tz));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]