Commit 1f475608 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Add a strerror for DB_BADFORMAT. Addresses #156.

git-svn-id: file:///svn/tokudb@1016 c7de825b-a66e-492c-adef-691d508d4ae1
parent 344047b8
......@@ -1301,6 +1301,10 @@ char *db_strerror(int error) {
return errorstr;
}
if (error==DB_BADFORMAT) {
return "Database Bad Format (probably a corrupted database)";
}
static char unknown_result[100]; // Race condition if two threads call this at the same time. However even in a bad case, it should be some sort of nul-terminated string.
errorstr = unknown_result;
snprintf(errorstr, sizeof unknown_result, "Unknown error code: %d", error);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment