Commit 285a3dd2 authored by claes's avatar claes

Success was returned even if an object didn't exist (ohead::get)

parent 72b44713
......@@ -8,6 +8,7 @@
#include "co_dcli.h"
#include "db_cxx.h"
#include "wb_ldh.h"
#include "wb_ldh_msg.h"
#include "wb_destination.h"
#include "wb_db.h"
#include "wb_name.h"
......@@ -359,6 +360,8 @@ wb_db_ohead &wb_db_ohead::get(wb_db_txn *txn, pwr_tOid oid)
m_data.set_flags(DB_DBT_USERMEM);
rc = m_db->m_t_ohead->get(txn, &m_key, &m_data, 0);
if ( rc == DB_NOTFOUND)
throw wb_error(LDH__NOSUCHOBJ);
if (rc)
printf("wb_db_ohead::get(txn, oid = %d.%d), get, rc %d\n", oid.vid, oid.oix, rc);
//pwr_Assert(oid.oix == m_o.oid.oix);
......
......@@ -195,6 +195,10 @@ wb_orep* wb_vrepdb::object(pwr_tStatus *sts, pwr_tOid oid)
return new (this) wb_orepdb(&m_ohead.m_o);
}
catch (wb_error &e) {
*sts = e.sts();
return 0;
}
catch (DbException &e) {
*sts = LDH__NOSUCHOBJ;
printf("vrepdb: %s\n", e.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