| 209 | static const char* kDerivedMarker = "[_Derived_]"; |
| 210 | |
| 211 | Status StatusGroup::MakeDerived(const Status& s) { |
| 212 | if (IsDerived(s)) { |
| 213 | return s; |
| 214 | } else { |
| 215 | return Status(s.code(), strings::StrCat(kDerivedMarker, s.error_message())); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | bool StatusGroup::IsDerived(const Status& s) { |
| 220 | return s.error_message().find(kDerivedMarker) != std::string::npos; |