Deutsch   English   Français   Italiano  
<105r2c7$cbta$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: nntp.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: saito <saitology9@gmail.com>
Newsgroups: comp.lang.tcl
Subject: Re: Timeout error with www
Date: Wed, 23 Jul 2025 12:24:38 -0400
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <105r2c7$cbta$2@dont-email.me>
References: <105jb3v$3flcc$1@dont-email.me>
 <nnd$17cf70bf$21264e50@a179fee47da3c131>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 23 Jul 2025 16:24:40 +0000 (UTC)
Injection-Info: dont-email.me; posting-host="76903307a7eac5304833606d806ebc2a";
	logging-data="405418"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+5Tlx86lks8O0L6IYQS2Ma"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:rWfYen4iDfr0+F+pDm4VZ3Uo02o=
In-Reply-To: <nnd$17cf70bf$21264e50@a179fee47da3c131>
Content-Language: en-US

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.