void tc_Error_SetBDB(TCBDB *bdb) { log_trace("ENTER"); int ecode = tcbdbecode(bdb); if (ecode == TCENOREC) { PyErr_SetString(PyExc_KeyError, tcbdberrmsg(ecode)); } else { tc_Error_SetCodeAndString(ecode, tcbdberrmsg(ecode)); } }
static void _set_tdb_error(TCTDB *db) { log_trace("ENTER"); int ecode = tctdbecode(db); const char *msg = tctdberrmsg(ecode); if (ecode == TCENOREC) { PyErr_SetString(PyExc_KeyError, msg); } else { log_debug("TDB error: %s", msg); tc_Error_SetCodeAndString(ecode, msg); } }