| 83 | } |
| 84 | |
| 85 | void StatusToProto(const Status& status, StatusPB* proto_status) { |
| 86 | proto_status->Clear(); |
| 87 | if (status.ok()) { |
| 88 | proto_status->set_status_code(TErrorCode::OK); |
| 89 | } else { |
| 90 | proto_status->set_status_code(status.code()); |
| 91 | proto_status->add_error_msgs(status.msg().msg()); |
| 92 | for (const string& s : status.msg().details()) proto_status->add_error_msgs(s); |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | } |
no test coverage detected