From: terry%netscape.com <> Date: Sat, 29 Aug 1998 01:31:05 +0000 (+0000) Subject: Debugging support -- if we get an SQL error, show the SQL command that failed. X-Git-Tag: bugzilla-1.3~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64fe1c3d786b90164404b3507255345b0d2cf072;p=thirdparty%2Fbugzilla.git Debugging support -- if we get an SQL error, show the SQL command that failed. --- diff --git a/globals.tcl b/globals.tcl index b30137c21c..275a6a3017 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 }