summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2019-03-17 00:12:36 +0100
committerMarkus Mittendrein <git@maxmitti.tk>2019-03-17 00:12:36 +0100
commit0f2dd317afaec91e902ee8fb1d8e5473b4450c02 (patch)
tree53dd74e26f71f762d4a851b9832f722267b8038a /src
parent63c32f730a6656170a19a31cbe946cf8ed80b119 (diff)
downloadcc4group-0f2dd317afaec91e902ee8fb1d8e5473b4450c02.tar.gz
cc4group-0f2dd317afaec91e902ee8fb1d8e5473b4450c02.zip
Add description to getError* methods
Diffstat (limited to 'src')
-rw-r--r--src/cc4group.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cc4group.h b/src/cc4group.h
index 76a0970..c8aeea0 100644
--- a/src/cc4group.h
+++ b/src/cc4group.h
@@ -77,12 +77,19 @@ typedef struct {
// the group owns the data pointed to. the pointer is valid until the group destructor is called
bool (*getEntryData)(CC4Group* const this, const char* const entryPath, const void** const data, size_t* const size);
+ // all error information is only meaningfully defined after any error ocurred (indicated by any method returning false) and always describes the last error that ocurred
+ // returns a human readable error message, including the "error causer", an interpretation of the error code, the internal method in which the error occured ("error method") and possibly also the error code
// the returned error message pointer is valid until the next call to getErrorMessage is issued or the group is destructed
+ // this method may return NULL if memory allocation for the formatted message fails; so NULL should be considered as out of memory
const char* (*getErrorMessage)(CC4Group* const this);
+ // returns the error code of the last error; interpretation of this code depends on the internally used function that caused the error
int32_t (*getErrorCode)(const CC4Group* const this);
+ // returns the internal method name in which the error ocurred
const char* (*getErrorMethod)(const CC4Group* const this);
+
+ // returns human readable information during which operation the error occured
const char* (*getErrorCauser)(const CC4Group* const this);
struct {