chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] How to catch an error when http-client can't connect?


From: Matt Welland
Subject: [Chicken-users] How to catch an error when http-client can't connect?
Date: Wed, 23 Jul 2014 12:41:44 -0700

I'd like to handle the case where http-client gets denied a connection. I wrapped the call to with-input-from-request with a handle-exceptions but that doesn't catch the error.

Thanks in advance for a pointer in the right direction.

Warning (#<thread: with-input-from-request>): in thread: (tcp-connect) cannot create socket - Connection refused

        Call history:

        http-client.scm:190: uri-common#uri-port         
        http-client.scm:190: tcp-connect         
        http-client.scm:506: k882        
        http-client.scm:506: g886        
        http-client.scm:605: intarweb#request-uri        
        http-client.scm:605: close-connection!   
        http-client.scm:160: ensure-local-connections    
        http-client.scm:128: connections-owner   
        http-client.scm:163: connections         
        http-client.scm:163: hash-table-ref/default      
        http-client.scm:606: max-retry-attempts  
        http-client.scm:607: max-retry-attempts  
        http-client.scm:608: retry-request?      
        http-client.scm:606: g904        
        http-client.scm:610: raise              <--


--
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the majority...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]