| 30 | const char *name() const noexcept override { return "Error"; } |
| 31 | |
| 32 | std::string message(int condition) const override { |
| 33 | switch (static_cast<ErrorErrorCode>(condition)) { |
| 34 | case ErrorErrorCode::MultipleErrors: |
| 35 | return "Multiple errors"; |
| 36 | case ErrorErrorCode::InconvertibleError: |
| 37 | return "Inconvertible error value. An error has occurred that could " |
| 38 | "not be converted to a known std::error_code. Please file a " |
| 39 | "bug."; |
| 40 | case ErrorErrorCode::FileError: |
| 41 | return "A file error occurred."; |
| 42 | } |
| 43 | llvm_unreachable("Unhandled error code"); |
| 44 | } |
| 45 | }; |
| 46 | |
| 47 | } |
no outgoing calls