return 0;
else
{
- dprint(2, (debugfile, "tcbdbopen failed for %s: %s (errno %d)\n", path, strerror (errno), errno));
+ int ecode = tcbdbecode (h->db);
+ dprint (2, (debugfile, "tcbdbopen failed for %s: %s (ecode %d)\n", path, tcbdberrmsg (ecode), ecode));
tcbdbdel(h->db);
return -1;
}
return;
if (!tcbdbclose(h->db))
- dprint (2, (debugfile, "tcbdbclose failed for %s: %s (errno %d)\n", h->folder, strerror (errno), errno));
+ {
+ int ecode = tcbdbecode (h->db);
+ dprint (2, (debugfile, "tcbdbclose failed for %s: %s (ecode %d)\n", h->folder, tcbdberrmsg (ecode), ecode));
+ }
tcbdbdel(h->db);
FREE(&h->folder);
FREE(&h);