Re: Timeout error with www

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Timeout error with www
De : saitology9 (at) *nospam* gmail.com (saito)
Groupes : comp.lang.tcl
Date : 23. Jul 2025, 17:24:38
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <105r2c7$cbta$2@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 7/22/2025 3:12 PM, Schelte wrote:
On 20/07/2025 20:04, saito wrote:
Any suggestion to make this work? Is there a list of codes to trap?
 You can add an "on error" handler to find out the error code for different cases:
 package require www
 set url http://10.10.10.10/
 try {
     www get $url
} trap {WWW DATA TIMEOUT} {msg info} {
     puts timeout
} on error {msg info} {
     puts "Unexpected error: [dict get $info -errorcode]"
}
 Running that will show that the error code for this specific failure is: WWW CONNECT {couldn't open socket: connection timed out}
 
Thanks! The on-error works nicely.
I eventually did discover the WWW CONNECT label after printing everything out but I wasn't sure if it was internal to the package or not.

Date Sujet#  Auteur
20 Jul19:04 * Timeout error with www2saito
23 Jul17:24 `- Re: Timeout error with www1saito

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal