Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #29 from ldorau/Replace-PMEMKV_STATUS_FAILED-with-…
Browse files Browse the repository at this point in the history
…PMEMKV_STATUS_UNKNOWN_ERROR

Replace PMEMKV_STATUS_FAILED with PMEMKV_STATUS_UNKNOWN_ERROR
  • Loading branch information
lukaszstolarczuk authored Sep 18, 2019
2 parents 7805af5 + 3601664 commit 78b81de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/io_pmem_pmemkv_Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,8 @@ extern "C" JNIEXPORT jboolean JNICALL Java_io_pmem_pmemkv_Database_database_1exi
auto engine = (pmemkv_db*) pointer;
const char* ckey = (char*) env->GetDirectBufferAddress(key);
auto status = pmemkv_exists(engine, ckey, keybytes);
if (status == PMEMKV_STATUS_FAILED) env->ThrowNew(env->FindClass(EXCEPTION_CLASS), "pmemkv_exists() failed");
if (status != PMEMKV_STATUS_OK && status != PMEMKV_STATUS_NOT_FOUND)
env->ThrowNew(env->FindClass(EXCEPTION_CLASS), "pmemkv_exists() failed");
return status == PMEMKV_STATUS_OK;

}
Expand Down

0 comments on commit 78b81de

Please sign in to comment.