| 33 | } |
| 34 | |
| 35 | std::string |
| 36 | CommInternalErrorCategory::message(int ev) const |
| 37 | { |
| 38 | switch (static_cast<rpc::comm::InternalError>(ev)) { |
| 39 | case rpc::comm::InternalError::MAX_TRANSIENT_ERRORS_HANDLED: |
| 40 | return {"We've reach the maximum attempt on transient errors."}; |
| 41 | case rpc::comm::InternalError::POLLIN_ERROR: |
| 42 | return {"We haven't got a POLLIN flag back while waiting"}; |
| 43 | case rpc::comm::InternalError::PARTIAL_READ: |
| 44 | return {"No more data to be read, but the buffer contains some invalid? data."}; |
| 45 | case rpc::comm::InternalError::FULL_BUFFER: |
| 46 | return {"Buffer's full."}; |
| 47 | default: |
| 48 | return "Internal Communication Error" + std::to_string(ev); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | const CommInternalErrorCategory commInternalErrorCategory{}; |
| 53 | } // anonymous namespace |