| 46 | } |
| 47 | |
| 48 | const char* mon_error_category::message(int ev, char* buf, |
| 49 | std::size_t len) const noexcept { |
| 50 | if (ev == 0) |
| 51 | return "No error"; |
| 52 | |
| 53 | if (len) { |
| 54 | auto s = cpp_strerror(ev); |
| 55 | auto n = s.copy(buf, len - 1); |
| 56 | *(buf + n) = '\0'; |
| 57 | } |
| 58 | return buf; |
| 59 | } |
| 60 | |
| 61 | std::string mon_error_category::message(int ev) const { |
| 62 | if (ev == 0) |
nothing calls this directly
no test coverage detected