if {[catch {::mysql::sel "SELECT * FROM `Yourtable`" -list} result]} {
putlog "An error occured while retrieving data from `Yourtable`. The error was \"$result\"."
} {
putlog "Retrieved data from `Yourtable`:"
foreach item $result {
putlog "data: [join $item ", "]"
}
}
In the case of an error, you'll also find extended information on the error in the ::errorInfo and ::errorCode variables (putlog $::errorCode or such).