From: Domas Mituzas Date: Thu, 19 Aug 2004 13:00:34 +0000 (+0000) Subject: add reportQueryError, halting on any error X-Git-Tag: 1.5.0alpha1~2293 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=2b94d6131733bed87aa14c07988797430abf255d;p=lhc%2Fweb%2Fwiklou.git add reportQueryError, halting on any error --- diff --git a/includes/DatabasePostgreSQL.php b/includes/DatabasePostgreSQL.php index 66c93d6b34..09100c7955 100644 --- a/includes/DatabasePostgreSQL.php +++ b/includes/DatabasePostgreSQL.php @@ -326,6 +326,14 @@ class DatabasePgsql extends Database { function timestamp( $ts=0 ) { return wfTimestamp(TS_DB,$ts); } + + function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) { + $message = "A database error has occurred\n" . + "Query: $sql\n" . + "Function: $fname\n" . + "Error: $errno $error\n"; + wfDebugDieBacktrace($message); + } } # Just an alias.