From 2b4b68e86e0b3e41b1ca94e28d3fbb88a091318f Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Mon, 9 Jan 2017 16:19:09 +1000 Subject: [PATCH] * add SIMDB_ERR_USAGE --- src/database.c | 2 ++ src/simdb.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/database.c b/src/database.c index 0482634..8ccb6dd 100644 --- a/src/database.c +++ b/src/database.c @@ -170,6 +170,8 @@ simdb_error(int error) { return "database opened in read-only mode"; } else if (error == SIMDB_ERR_NXRECORD) { return "no such record in database"; + } else if (error == SIMDB_ERR_USAGE) { + return "wrong parameters passed to finction"; } return "unknown error"; } diff --git a/src/simdb.h b/src/simdb.h index 63cf57f..6602ec4 100644 --- a/src/simdb.h +++ b/src/simdb.h @@ -34,6 +34,7 @@ #define SIMDB_ERR_WRONGVERS -4 /**< database version mismatch */ #define SIMDB_ERR_NXRECORD -5 /**< no such record in database */ #define SIMDB_ERR_READONLY -6 /**< database opened in read-only mode */ +#define SIMDB_ERR_USAGE -7 /**< wrong arguments passed */ /** @} */ /** opaque database handler */