Sujet : Timeout error with www
De : saitology9 (at) *nospam* gmail.com (saito)
Groupes : comp.lang.tclDate : 20. Jul 2025, 19:04:47
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <105jb3v$3flcc$1@dont-email.me>
User-Agent : Mozilla Thunderbird
I am using www to fetch a url. I want to catch timeouts in a try-trap block. I believe I am following the exact same syntax in the tests for the package but it still throws an error.
package req www
set url ...
% try {www get $url} trap {WWW DATA TIMEOUT} {msg info} {puts timeout}
couldn't open socket: connection timed out
% try {www get $url} trap {WWW TIMEOUT} {msg info} {puts timeout}
couldn't open socket: connection timed out
Any suggestion to make this work? Is there a list of codes to trap?