1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-04 14:52:24 -05:00

Rethrow DavMailException on connect exception

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2166 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2013-08-25 16:07:37 +00:00
parent 0c6899807d
commit 79f93e331b

View File

@ -44,6 +44,7 @@ import javax.mail.internet.*;
import javax.mail.util.SharedByteArrayInputStream;
import java.awt.image.BufferedImage;
import java.io.*;
import java.net.ConnectException;
import java.net.NoRouteToHostException;
import java.net.UnknownHostException;
import java.text.ParseException;
@ -236,6 +237,10 @@ public abstract class ExchangeSession {
} catch (DavMailAuthenticationException exc) {
LOGGER.error(exc.getMessage());
throw exc;
} catch (ConnectException exc) {
BundleMessage message = new BundleMessage("EXCEPTION_CONNECT", exc.getClass().getName(), exc.getMessage());
ExchangeSession.LOGGER.error(message);
throw new DavMailException("EXCEPTION_DAVMAIL_CONFIGURATION", message);
} catch (UnknownHostException exc) {
BundleMessage message = new BundleMessage("EXCEPTION_CONNECT", exc.getClass().getName(), exc.getMessage());
ExchangeSession.LOGGER.error(message);