mirror of
https://github.com/moparisthebest/davmail
synced 2024-11-11 11:55:08 -05:00
Catch unknown host on session login
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@553 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
3a3483cd7d
commit
8660c267e1
@ -29,6 +29,7 @@ import javax.mail.internet.MimePart;
|
|||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -180,6 +181,10 @@ public class ExchangeSession {
|
|||||||
} catch (DavMailAuthenticationException exc) {
|
} catch (DavMailAuthenticationException exc) {
|
||||||
LOGGER.error(exc.getLogMessage());
|
LOGGER.error(exc.getLogMessage());
|
||||||
throw exc;
|
throw exc;
|
||||||
|
} catch (UnknownHostException exc) {
|
||||||
|
BundleMessage message = new BundleMessage("EXCEPTION_UNKNOWN_HOST", exc.getMessage());
|
||||||
|
ExchangeSession.LOGGER.error(message);
|
||||||
|
throw new DavMailException("EXCEPTION_DAVMAIL_CONFIGURATION", message);
|
||||||
} catch (IOException exc) {
|
} catch (IOException exc) {
|
||||||
LOGGER.error(BundleMessage.formatLog("EXCEPTION_EXCHANGE_LOGIN_FAILED", exc));
|
LOGGER.error(BundleMessage.formatLog("EXCEPTION_EXCHANGE_LOGIN_FAILED", exc));
|
||||||
throw new DavMailException("EXCEPTION_EXCHANGE_LOGIN_FAILED", exc);
|
throw new DavMailException("EXCEPTION_EXCHANGE_LOGIN_FAILED", exc);
|
||||||
|
@ -199,6 +199,6 @@ EXCEPTION_INVALID_CONTENT_TYPE=Type de contenu invalide : {0}
|
|||||||
EXCEPTION_INVALID_SEARCH_PARAMETERS=Paremètres de recherche invalides : {0}
|
EXCEPTION_INVALID_SEARCH_PARAMETERS=Paremètres de recherche invalides : {0}
|
||||||
EXCEPTION_NETWORK_DOWN=Toutes les interfaces réseaux sont indisponibles !
|
EXCEPTION_NETWORK_DOWN=Toutes les interfaces réseaux sont indisponibles !
|
||||||
EXCEPTION_DAVMAIL_CONFIGURATION=Erreur de configuration DavMail : \n{0}
|
EXCEPTION_DAVMAIL_CONFIGURATION=Erreur de configuration DavMail : \n{0}
|
||||||
EXCEPTION_UNKNOWN_HOST=Nom de serveur invalide {0}
|
EXCEPTION_UNKNOWN_HOST=Nom de serveur {0} invalide
|
||||||
EXCEPTION_CONNECTION_FAILED=Connection OWA à {0} impossible, code retour {1}, vérifier la configuration
|
EXCEPTION_CONNECTION_FAILED=Connection OWA à {0} impossible, code retour {1}, vérifier la configuration
|
||||||
EXCEPTION_EXCHANGE_LOGIN_FAILED=Exception lors de la connexion Exchange : {0}
|
EXCEPTION_EXCHANGE_LOGIN_FAILED=Exception lors de la connexion Exchange : {0}
|
Loading…
Reference in New Issue
Block a user