1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-10-31 15:35:05 -04:00

EWS: improve error handling on socket exception

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1928 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2012-03-20 00:05:13 +00:00
parent b66a3a6ebf
commit 38c5bc2b97

View File

@ -45,6 +45,7 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.SocketException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@ -2046,6 +2047,9 @@ public class EwsExchangeSession extends ExchangeSession {
serverVersion = ewsMethod.getServerVersion();
}
ewsMethod.checkSuccess();
} catch (SocketException e) {
LOGGER.error(e+" "+e.getMessage(), e);
throw new EWSException(e+" "+e.getMessage());
} finally {
ewsMethod.releaseConnection();
}