Browse Source

Add error message for easycsv_find_value fail

Signed-off-by: Pradana AUMARS <paumars@courrier.dev>
redesign
Pradana AUMARS 10 months ago
parent
commit
4647b72551
  1. 1
      src/easycsv_error.c
  2. 1
      src/easycsv_error.h

1
src/easycsv_error.c

@ -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;
}
}

1
src/easycsv_error.h

@ -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

Loading…
Cancel
Save