johvargas / sfdc-wsc

Automatically exported from code.google.com/p/sfdc-wsc
0 stars 0 forks source link

Feature request: RequestTimedOutException with SocketTimeoutException's #67

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have a number of situations where a RequestTimedOutException would be 
appropriate instead of just a ConnectionException when SoapConnection.send() 
encounters a SocketTimeoutException.

If a RequestTimedOutException extends ConnectionException this can be done 
without changing the api.

Eg (SoapConnection, line 112+):

        } catch (SocketTimeoutException e) {
            long timeTaken = System.currentTimeMillis() - startTime;
            throw new RequestTimedOutException("Request to " + url + " timed out. TimeTaken=" + timeTaken +
                    " ConnectionTimeout=" + config.getConnectionTimeout() + " ReadTimeout=" + 
                    config.getReadTimeout(), e);
        }

And the RequestTimedOutException, eg.:

    public static class RequestTimedOutException extends ConnectionException {
        private static final long serialVersionUID = 1L;
        private RequestTimedOutException(String message, Exception e) {
            super(message, e);
        }
    }

All in the (slightly modified) attached SoapConnection.java

Original issue reported on code.google.com by jesperudby on 23 Jan 2013 at 9:35

Attachments:

GoogleCodeExporter commented 8 years ago
Working on it to be included in 23

Original comment by jesperudby on 31 Jan 2013 at 8:31

GoogleCodeExporter commented 8 years ago

Original comment by jesperudby on 31 Jan 2013 at 8:31

GoogleCodeExporter commented 8 years ago
fixed in 23

Original comment by jesperudby on 8 Feb 2013 at 6:38