diff options
author | terry%netscape.com <> | 1998-08-29 03:31:05 +0200 |
---|---|---|
committer | terry%netscape.com <> | 1998-08-29 03:31:05 +0200 |
commit | 64fe1c3d786b90164404b3507255345b0d2cf072 (patch) | |
tree | 4a280dd34e367e443c5b38fc09c0747c082a83f6 | |
parent | f83b7e2bb44de105c02781dad2e583b836913e17 (diff) | |
download | bugzilla-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.tcl | 8 |
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 } |