shaniqua-tclcurl-fa/tests/errorBuffer.tcl
2014-02-05 16:43:59 -08:00

24 lines
488 B
Tcl
Executable File

package require TclCurl
set curlHandle [curl::init]
$curlHandle configure -url "Shire.Asturias.com" -errorbuffer errorMsg
if {[catch {$curlHandle perform}]} {
puts "The error message: $errorMsg"
}
$curlHandle configure -url "Shire.Asturias.com" -errorbuffer error(msg)
if {[catch {$curlHandle perform}]} {
puts "The error message: $error(msg)"
}
$curlHandle cleanup
unset error
catch {curl::transfer -url "Shire.Asturias.com" -errorbuffer error(msg)}
puts "Error: $error(msg)"