File: errorBuffer.tcl

package info (click to toggle)
tclcurl 7.22.1-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,932 kB
  • sloc: ansic: 4,479; tcl: 898; sh: 435; makefile: 39
file content (23 lines) | stat: -rwxr-xr-x 488 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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)"