| 131 | const ErrorCode code; |
| 132 | |
| 133 | static std::string BuildMessage(const std::string &message, |
| 134 | const ErrorCode code_, |
| 135 | const std::string &sourceref, |
| 136 | const char *possiblecause = nullptr) |
| 137 | { |
| 138 | std::string result; |
| 139 | result += ErrorDescriptions[code_]; |
| 140 | result += ": " + std::string(message); |
| 141 | result += possiblecause != nullptr |
| 142 | ? (std::string(" (possible cause: \"") + possiblecause + "\")") |
| 143 | : ""; |
| 144 | result += " (at " + sourceref + ")"; |
| 145 | return result; |
| 146 | } |
| 147 | }; |
| 148 | } // namespace osrm::util |
| 149 |
nothing calls this directly
no outgoing calls
no test coverage detected