| 108 | } |
| 109 | |
| 110 | std::string Status::ToString() const { |
| 111 | std::string result(CodeAsString()); |
| 112 | if (state_ == nullptr) { |
| 113 | return result; |
| 114 | } |
| 115 | result += ": "; |
| 116 | result += state_->msg; |
| 117 | if (state_->detail != nullptr) { |
| 118 | result += ". Detail: "; |
| 119 | result += state_->detail->ToString(); |
| 120 | } |
| 121 | |
| 122 | return result; |
| 123 | } |
| 124 | |
| 125 | std::string Status::ToStringWithoutContextLines() const { |
| 126 | auto message = ToString(); |
nothing calls this directly
no outgoing calls
no test coverage detected