Fix logging error that crashes on bad database

This commit is contained in:
Ron Pedde 2006-05-08 05:36:15 +00:00
parent 658bf223f2
commit e16844dbee
1 changed files with 4 additions and 2 deletions

View File

@ -177,13 +177,15 @@ int db_sql_fetch_row(char **pe, SQL_ROW *row, char *fmt, ...) {
db_sql_vmfree_fn(query);
if(err != DB_E_SUCCESS) {
DPRINTF(E_SPAM,L_DB,"Error: enum_begin failed: %s\n",(pe) ? *pe : "?");
DPRINTF(E_SPAM,L_DB,"Error: enum_begin failed (error %d): %s\n",
err,(pe) ? *pe : "?");
return err;
}
err=db_sql_enum_fetch_fn(pe, row);
if(err != DB_E_SUCCESS) {
DPRINTF(E_SPAM,L_DB,"Error: enum_fetch failed: %s\n",*pe);
DPRINTF(E_SPAM,L_DB,"Error: enum_fetch failed (error %d): %s\n",
err,(pe) ? *pe : "?");
db_sql_enum_end_fn(NULL);
return err;
}