]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Debugging support -- if we get an SQL error, show the SQL command that failed.
authorterry%netscape.com <>
Sat, 29 Aug 1998 01:31:05 +0000 (01:31 +0000)
committerterry%netscape.com <>
Sat, 29 Aug 1998 01:31:05 +0000 (01:31 +0000)
globals.tcl

index b30137c21cadfa26b478d384c41215c1b641a323..275a6a301787e6ceec1ceb7eddecf19daf727e25 100644 (file)
@@ -59,8 +59,12 @@ proc DebugConnect {} {
 
 
 proc SendSQL { str } {
-    global mysqlhandle
-    mysqlsel $mysqlhandle $str
+# puts $str
+    global mysqlhandle errorInfo
+    if {[catch {mysqlsel $mysqlhandle $str} errmsg]} {
+        puts $str
+        error "$errmsg - $str" $errorInfo
+    }
     return 0
 }