You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Joel Goldstein <Jo...@optionable.com> on 2003/04/11 16:35:09 UTC

Program not notified of exception

I have an infinite loop that sends a message to my server every 3 seconds my
loop hung and I then got the following output from HttpClient after 90
seconds

Apr 10, 2003 4:06:54 PM org.apache.commons.httpclithodBase processRequest
INFO: Recoverable exception caught when writing request

After this my program kept running I never ended up in the catch block. My
question is why was this exception not passed on to me and can I set the
time it waited to tell me this info to be shorter?

Here is the code that gave me this output:
        try
        {
            String url = this.servletURL.toString() + "?msgType=15" +
"&sessionId=" + this.sessionID.longValue();

            HttpMethod method = new GetMethod(url);
            frontClient.setConnectionTimeout(5000);
            frontClient.setTimeout(timeout);
            frontClient.executeMethod(method);
            String responseBody = method.getResponseBodyAsString();
        }
        catch(Exception e)
        {
            throw new RuntimeException(e.getMessage());
        }

Thanks
Joel