From ed7854c6e006935d8be9b0e860111767f40b3b48 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 3 Apr 2008 16:42:25 +0000 Subject: Added query display to database exceptions git-svn-id: https://code.elgg.org/elgg/trunk@395 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/database.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engine/lib/database.php b/engine/lib/database.php index 7f012fc17..e2a92c1cd 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -150,7 +150,7 @@ } if (mysql_errno($dblink)) - throw new DatabaseException(mysql_error($dblink)); + throw new DatabaseException(mysql_error($dblink) . " QUERY: " . $query); if (empty($resultarray)) { return false; @@ -185,7 +185,7 @@ } if (mysql_errno($dblink)) - throw new DatabaseException(mysql_error($dblink)); + throw new DatabaseException(mysql_error($dblink) . " QUERY: " . $query); return false; } @@ -209,7 +209,7 @@ return mysql_insert_id($dblink); if (mysql_errno($dblink)) - throw new DatabaseException(mysql_error($dblink)); + throw new DatabaseException(mysql_error($dblink) . " QUERY: " . $query); return false; } @@ -233,7 +233,7 @@ return mysql_affected_rows(); if (mysql_errno($dblink)) - throw new DatabaseException(mysql_error($dblink)); + throw new DatabaseException(mysql_error($dblink) . " QUERY: " . $query); return false; @@ -258,7 +258,7 @@ return mysql_affected_rows(); if (mysql_errno($dblink)) - throw new DatabaseException(mysql_error($dblink)); + throw new DatabaseException(mysql_error($dblink) . " QUERY: " . $query); return false; } -- cgit v1.2.3