summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterry%netscape.com <>1998-08-29 03:31:05 +0200
committerterry%netscape.com <>1998-08-29 03:31:05 +0200
commit64fe1c3d786b90164404b3507255345b0d2cf072 (patch)
tree4a280dd34e367e443c5b38fc09c0747c082a83f6
parentf83b7e2bb44de105c02781dad2e583b836913e17 (diff)
downloadbugzilla-64fe1c3d786b90164404b3507255345b0d2cf072.tar.gz
bugzilla-64fe1c3d786b90164404b3507255345b0d2cf072.tar.xz
Debugging support -- if we get an SQL error, show the SQL command that failed.
-rw-r--r--globals.tcl8
1 files changed, 6 insertions, 2 deletions
diff --git a/globals.tcl b/globals.tcl
index b30137c21..275a6a301 100644
--- a/globals.tcl
+++ b/globals.tcl
@@ -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
}