X-Git-Url: http://git.sven.stormbind.net/?a=blobdiff_plain;f=tests%2FerrorBuffer.tcl;fp=tests%2FerrorBuffer.tcl;h=e90896c87374ee25598c2c10469b5ac1318e3189;hb=b0e6fb6e4379fb87fa2854b84a56c5ad49c644da;hp=0000000000000000000000000000000000000000;hpb=c9a5bcd9d76f699909b24e71a2a216d36062ab0b;p=sven%2Ftclcurl.git

diff --git a/tests/errorBuffer.tcl b/tests/errorBuffer.tcl
new file mode 100755
index 0000000..e90896c
--- /dev/null
+++ b/tests/errorBuffer.tcl
@@ -0,0 +1,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)"
+
+