Coverage Report

Created: 2025-06-22 06:18

/src/h2o/deps/libyrmcds/strerror.c
Line
Count
Source (jump to first uncovered line)
1
// (C) 2013-2015 Cybozu.
2
3
#include "yrmcds.h"
4
5
0
const char* yrmcds_strerror(yrmcds_error e) {
6
0
    switch( e ) {
7
0
    case YRMCDS_OK:
8
0
        return "OK";
9
0
    case YRMCDS_SYSTEM_ERROR:
10
0
        return "Check errno for details";
11
0
    case YRMCDS_BAD_ARGUMENT:
12
0
        return "Bad argument";
13
0
    case YRMCDS_NOT_RESOLVED:
14
0
        return "Host not found";
15
0
    case YRMCDS_TIMEOUT:
16
0
        return "Timeout";
17
0
    case YRMCDS_DISCONNECTED:
18
0
        return "Connection was reset by peer";
19
0
    case YRMCDS_OUT_OF_MEMORY:
20
0
        return "Failed to allocate memory";
21
0
    case YRMCDS_COMPRESS_FAILED:
22
0
        return "Failed to compress data";
23
0
    case YRMCDS_PROTOCOL_ERROR:
24
0
        return "Received malformed packet";
25
0
    case YRMCDS_NOT_IMPLEMENTED:
26
0
        return "Not implemented";
27
0
    case YRMCDS_IN_BINARY:
28
0
        return "Connection is fixed for binary protocol";
29
0
    case YRMCDS_BAD_KEY:
30
0
        return "Bad key";
31
0
    default:
32
0
        return "Unknown error";
33
0
    };
34
0
}