namespace eval catchSqlException { proc catchSqlException { SQLExceptionI } { set procName [ lindex [ info level 0 ] 0 ] putsLog "## proc - $procName" foreach i [ info args $procName ] { upvar 0 $i ilocal set propertiesArray($i) $ilocal } putsLog "properties are.................." foreach { a b } [ array get propertiesArray ] { putsLog [ format "%-35s %s" "$a" "$b" ] } global AdminConfig global AdminControl global Help global null set sqlCode [ $SQLExceptionI toString ] set sqlMessage [ $SQLExceptionI getMessage ] set errorCode [ $SQLExceptionI getErrorCode ] set sqlState [ $SQLExceptionI getSQLState ] if { $sqlCode != $null } { lappend msgList "sql code is: \t$sqlCode" } if { $sqlMessage != $null } { lappend msgList "sql message is: \t$sqlMessage" } if { $errorCode != $null } { lappend msgList "error code is: \t$errorCode" } if { $sqlState != $null } { lappend msgList "sql state is: \t$sqlState\n" } while { $SQLExceptionI != $null } { set sqlCode [ $SQLExceptionI toString ] set sqlMessage [ $SQLExceptionI getMessage ] set errorCode [ $SQLExceptionI getErrorCode ] set sqlState [ $SQLExceptionI getSQLState ] if { $sqlCode != $null } { lappend msgList "sql code is: \t$sqlCode" } if { $sqlMessage != $null } { lappend msgList "sql message is: \t$sqlMessage " } if { $errorCode != $null } { lappend msgList "error code is: \t$errorCode" } if { $sqlState != $null } { lappend msgList "sql state is: \t$sqlState" } set SQLExceptionI [ $SQLExceptionI getNextException ] } return -code error $msgList } }