Posted to tcl by dandyn at Sat Sep 14 18:50:43 GMT 2024view raw
- if {[catch {::http::geturl $url -timeout 20000} tok]} { error $tok }
- if {[::http::status $tok] ne "ok"} { error "$mod module (TCP error: [::http::status $tok][::http::cleanup $tok])" }
- if {[::http::ncode $tok] != 200} { error "$mod module (HTTP error: [::http::code $tok][::http::cleanup $tok])" }
- set data [::http::data $tok] ; ::http::cleanup $tok ; set DrpCnt 0
- catch {putlog "[::http::status $data]"}
- catch {putlog "$::errorInfo"}; catch {putlog "$::errorCode"}
- ------------------------
- code doeasn't give any VISIBLE error, but when checking with following I get this...
- from 'catch {putlog "$::errorInfo"}; catch {putlog "$::errorCode"}' --> error
- from 'catch {putlog "$::errorInfo"}; catch {putlog "$::errorCode"}' --> can not find channel named "sock8334752d0"
- while executing
- "eof $sock"
- TCL LOOKUP CHANNEL sock8334752d0
Comments
Posted by dandyn at Sat Sep 14 18:53:02 GMT 2024 [text] [code]
ops, pasted wrong.. catch {putlog "[::http::status $data]"} gives ---> error