Add some asserts

This commit is contained in:
JoelKatz
2013-07-11 15:16:00 -07:00
parent 55a8bcaf5e
commit e7364452a0

View File

@@ -112,9 +112,14 @@ public:
rc = mdb_put(txn, m_dbi, &key, &data, 0); rc = mdb_put(txn, m_dbi, &key, &data, 0);
if (rc != 0) if (rc != 0)
{
assert(false);
break; break;
} }
} }
}
else
assert(false);
if (rc == 0) if (rc == 0)
rc = mdb_txn_commit(txn); rc = mdb_txn_commit(txn);
@@ -147,6 +152,8 @@ public:
else else
assert(rc == MDB_NOTFOUND); assert(rc == MDB_NOTFOUND);
} }
else
assert(false);
mdb_txn_abort(txn); mdb_txn_abort(txn);