Add error message for easycsv_find_value fail

Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
This commit is contained in:
Pradana AUMARS 2021-07-16 21:31:31 +02:00
parent 61618b72bc
commit 4647b72551
2 changed files with 2 additions and 0 deletions

View File

@ -44,6 +44,7 @@ easycsv_error(EASYCSV_ERROR error,
case EASYCSV_COLNOTEXIST: sprintf(s_error_msg, "given column does not exist"); return;
case EASYCSV_PUSHCOLFAIL: sprintf(s_error_msg, "failed to push value under column"); return;
case EASYCSV_COLNUMFAIL: sprintf(s_error_msg, "failed to determine the column number of a value in the first row"); return;
case EASYCSV_FINDVALUEFAIL: sprintf(s_error_msg, "cannot find the value %s", error_msg); return;
default: sprintf(s_error_msg, "unknown error"); return;
}
}

View File

@ -33,6 +33,7 @@ typedef enum EASYCSV_ERROR {
EASYCSV_PUSHCOLFAIL, // push column value fail
EASYCSV_COLNUMFAIL, // column number retrieval fail
EASYCSV_READVALUEFAIL, // read value fail
EASYCSV_FINDVALUEFAIL, // find value fail
} EASYCSV_ERROR;
void