Posted to tcl by dandyn at Sat Sep 14 18:50:43 GMT 2024view raw

  1.  
  2.  
  3.  
  4. if {[catch {::http::geturl $url -timeout 20000} tok]} { error $tok }
  5. if {[::http::status $tok] ne "ok"} { error "$mod module (TCP error: [::http::status $tok][::http::cleanup $tok])" }
  6. if {[::http::ncode $tok] != 200} { error "$mod module (HTTP error: [::http::code $tok][::http::cleanup $tok])" }
  7. set data [::http::data $tok] ; ::http::cleanup $tok ; set DrpCnt 0
  8.  
  9. catch {putlog "[::http::status $data]"}
  10.  
  11. catch {putlog "$::errorInfo"}; catch {putlog "$::errorCode"}
  12.  
  13. ------------------------
  14. code doeasn't give any VISIBLE error, but when checking with following I get this...
  15.  
  16. from 'catch {putlog "$::errorInfo"}; catch {putlog "$::errorCode"}' --> error
  17. from 'catch {putlog "$::errorInfo"}; catch {putlog "$::errorCode"}' --> can not find channel named "sock8334752d0"
  18. while executing
  19. "eof $sock"
  20. TCL LOOKUP CHANNEL sock8334752d0
  21.  
  22.  
  23.  
  24.  

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

Add a comment

Please note that this site uses the meta tags nofollow,noindex for all pages that contain comments.
Items are closed for new comments after 1 week