diff options
author | Mark Storer <Mark.Storer@evault.com> | 2014-10-06 15:12:28 -0700 |
---|---|---|
committer | Mark Storer <Mark.Storer@evault.com> | 2014-10-06 15:12:28 -0700 |
commit | 59636338e8b44c19adc50a818319bebd44a8b677 (patch) | |
tree | 17a0494a952bdb591419ddd5ee3e5c3f65931c16 | |
parent | 483764209c29e6fbca735ad1c760d1b581238488 (diff) | |
download | liberasurecode-59636338e8b44c19adc50a818319bebd44a8b677.tar.gz |
Updated error codes to reflect discussion:error_codes
1) Base error created for each error section
2) Expanded the system error conditions
3) Corrected metadata error number
-rw-r--r-- | include/erasurecode/erasurecode.h | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/include/erasurecode/erasurecode.h b/include/erasurecode/erasurecode.h index 854c1a2..8bc7161 100644 --- a/include/erasurecode/erasurecode.h +++ b/include/erasurecode/erasurecode.h @@ -310,30 +310,36 @@ int liberasurecode_get_minimum_encode_size(int desc); /* ==~=*=~===~=*=~==~=*=~== liberasurecode Error codes =~=*=~==~=~=*=~==~== */ -/* Error codes */ +/* Error codes + * TODO: Doxygen compatible comments of error codes + */ typedef enum { /* Generic */ - EINSUFFRESOURCES = 100, + ESYSTEM = 100, + EINSUFFMEM = 101, + EINSUFFPERMISSION = 102, /* Backend registration */ - EBACKENDNOTSUPP = 200, - EECMETHODNOTIMPL = 201, - EBACKENDINITERR = 202, - EBACKENDINUSE = 203, - EBACKENDNOTAVAIL = 204, + EBACKEND = 200, + EBACKENDNOTSUPP = 201, + EECMETHODNOTIMPL = 202, + EBACKENDINITERR = 203, + EBACKENDINUSE = 204, + EBACKENDNOTAVAIL = 205, /* Encoding, decoding, reconstruction */ - EINCOMPATBACKEND = 300, - EINCOMPATFRAGS = 301, - EBADALIGN = 302, - EINSUFFDATA = 303, - EINSUFFFRAGS = 304, - EBADFRAGORDER = 305, - EBADCHECKSUM = 306, + ECODING = 300, + EINCOMPATBACKEND = 301, + EINCOMPATFRAGS = 301, + EBADALIGN = 302, + EINSUFFDATA = 303, + EINSUFFFRAGS = 304, + EBADFRAGORDER = 305, + EBADCHECKSUM = 306, /* Metadata */ - EBADMETADATAVER = 600, - + EMETADATA = 400, + EBADMETADATAVER = 401, } LIBERASURECODE_ERROR_CODES; /* =~=*=~==~=*=~==~=*=~==~=*=~===~=*=~==~=*=~===~=*=~==~=*=~===~=*=~==~=*=~= */ |