| 448 | } // namespace |
| 449 | |
| 450 | std::shared_ptr<StatusDetail> StatusDetailFromErrno(int errnum) { |
| 451 | if (!errnum) { |
| 452 | return nullptr; |
| 453 | } |
| 454 | return std::make_shared<ErrnoDetail>(errnum); |
| 455 | } |
| 456 | |
| 457 | std::optional<int> ErrnoFromStatusDetail(const StatusDetail& detail) { |
| 458 | if (detail.type_id() == kErrnoDetailTypeId) { |
no outgoing calls
no test coverage detected