Commit 219509af authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

catching exception properly in WriteBatchImpl

parent 1af4ffbc
......@@ -45,9 +45,11 @@ class WriteBatchImpl {
*ok = 1;
try {
db->put_multi(keys, vals);
} catch(Exception& ex) {
*ok = 0;
*exception = ex;
} catch(sdskv::exception& ex) {
if(ex.error() != SDSKV_ERR_KEYEXISTS) {
*ok = 0;
*exception = Exception(std::string("SDSKV error: ")+ex.what());
}
}
}
......
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