diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-29 18:38:55 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-29 18:38:55 +0000 |
commit | 005a583f326fd48f501ec6569e00ebcdfb66b7ac (patch) | |
tree | d60cd0160daace079b6c612380a88b5abcd98c7c /includes/database.pgsql.inc | |
parent | 94c1729eacb262598aa75fda35049b344051012b (diff) | |
download | brdo-005a583f326fd48f501ec6569e00ebcdfb66b7ac.tar.gz brdo-005a583f326fd48f501ec6569e00ebcdfb66b7ac.tar.bz2 |
#168812 by webchick and pwolanin: in case we have a database error, trace it back to the original database function call, so we can provide a more accurate error message for DB errors
Diffstat (limited to 'includes/database.pgsql.inc')
-rw-r--r-- | includes/database.pgsql.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/database.pgsql.inc b/includes/database.pgsql.inc index 23fd2b8d6..36ca5689a 100644 --- a/includes/database.pgsql.inc +++ b/includes/database.pgsql.inc @@ -171,6 +171,8 @@ function _db_query($query, $debug = 0) { return $last_result; } else { + // Indicate to drupal_error_handler that this is a database error. + ${DB_ERROR} = TRUE; trigger_error(check_plain(pg_last_error($active_db) ."\nquery: ". $query), E_USER_WARNING); return FALSE; } |