| 120 | : Msg(S.str()), EC(EC), PrintMsgOnly(true) {} |
| 121 | |
| 122 | void StringError::log(raw_ostream &OS) const { |
| 123 | if (PrintMsgOnly) { |
| 124 | OS << Msg; |
| 125 | } else { |
| 126 | OS << EC.message(); |
| 127 | if (!Msg.empty()) |
| 128 | OS << (" " + Msg); |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | std::error_code StringError::convertToErrorCode() const { |
| 133 | return EC; |
no test coverage detected