Sha256: f2eac763bb53beda8d4dd404d6d7318b777a8af395f85a656c7f21ad73c960b1

Contents?: true

Size: 922 Bytes

Versions: 9

Compression:

Stored size: 922 Bytes

Contents

#define ERROR(base) error_msg(base->last_error(base))

const char *error_msg(int error) {
    static char buf[32];
    switch (error) {
    case MSPACK_ERR_OK:         return "no error";
    case MSPACK_ERR_ARGS:       return "bad arguments to library function";
    case MSPACK_ERR_OPEN:       return "error opening file";
    case MSPACK_ERR_READ:       return "read error";
    case MSPACK_ERR_WRITE:      return "write error";
    case MSPACK_ERR_SEEK:       return "seek error";
    case MSPACK_ERR_NOMEMORY:   return "out of memory";
    case MSPACK_ERR_SIGNATURE:  return "bad signature";
    case MSPACK_ERR_DATAFORMAT: return "error in data format";
    case MSPACK_ERR_CHECKSUM:   return "checksum error";
    case MSPACK_ERR_CRUNCH:     return "compression error";
    case MSPACK_ERR_DECRUNCH:   return "decompression error";
    }

    snprintf(buf, sizeof(buf), "unknown error %d", error);
    return buf;
}

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
libmspack-0.10.1 ext/libmspack/test/error.h
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/libmspack-0.1.0/ext/libmspack/test/error.h
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/libmspack-0.1.0/ext/libmspack/test/error.h
libmspack-0.1.0 ext/libmspack/test/error.h
libmspack-0.0.5 ext/libmspack/test/error.h
libmspack-0.0.4 ext/libmspack/test/error.h
libmspack-0.0.3 ext/libmspack/test/error.h
libmspack-0.0.2 ext/libmspack/test/error.h
libmspack-0.0.1 ext/libmspack/test/error.h