mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
IMAP: improve error logging on network down
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@738 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
a5d91980b1
commit
94ee1091a2
@ -163,7 +163,7 @@ public final class ExchangeSessionFactory {
|
|||||||
BundleMessage message = new BundleMessage("EXCEPTION_CONNECT", exc.getClass().getName(), exc.getMessage());
|
BundleMessage message = new BundleMessage("EXCEPTION_CONNECT", exc.getClass().getName(), exc.getMessage());
|
||||||
if (errorSent) {
|
if (errorSent) {
|
||||||
ExchangeSession.LOGGER.warn(message);
|
ExchangeSession.LOGGER.warn(message);
|
||||||
throw new NetworkDownException("EXCEPTION_DAVMAIL_CONFIGURATION");
|
throw new NetworkDownException("EXCEPTION_DAVMAIL_CONFIGURATION", message);
|
||||||
} else {
|
} else {
|
||||||
// Mark that an error has been sent so you only get one
|
// Mark that an error has been sent so you only get one
|
||||||
// error in a row (not a repeating string of errors).
|
// error in a row (not a repeating string of errors).
|
||||||
|
@ -31,4 +31,13 @@ public class NetworkDownException extends DavMailException {
|
|||||||
public NetworkDownException(String key) {
|
public NetworkDownException(String key) {
|
||||||
super(key);
|
super(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build a network down exception with the provided BundleMessage key.
|
||||||
|
* @param key message key
|
||||||
|
* @param message detailed message
|
||||||
|
*/
|
||||||
|
public NetworkDownException(String key, Object message) {
|
||||||
|
super(key, message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -470,7 +470,7 @@ public class ImapConnection extends AbstractConnection {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
DavGatewayTray.log(e);
|
DavGatewayTray.log(e);
|
||||||
try {
|
try {
|
||||||
String message = (e.getMessage() == null) ? e.toString() : e.getMessage();
|
String message = ((e.getMessage() == null) ? e.toString() : e.getMessage()).replaceAll("\\n", " ");
|
||||||
if (commandId != null) {
|
if (commandId != null) {
|
||||||
sendClient(commandId + " BAD unable to handle request: " + message);
|
sendClient(commandId + " BAD unable to handle request: " + message);
|
||||||
} else {
|
} else {
|
||||||
|
@ -3,7 +3,7 @@ EXCEPTION_AUTHENTICATION_FAILED_PASSWORD_EXPIRED=Authentication failed: password
|
|||||||
EXCEPTION_AUTHENTICATION_FAILED_RETRY=Authentication failed: invalid user or password, retry with domain\\user
|
EXCEPTION_AUTHENTICATION_FAILED_RETRY=Authentication failed: invalid user or password, retry with domain\\user
|
||||||
EXCEPTION_AUTHENTICATION_FORM_NOT_FOUND=Authentication form not found at {0}
|
EXCEPTION_AUTHENTICATION_FORM_NOT_FOUND=Authentication form not found at {0}
|
||||||
EXCEPTION_CONNECTION_FAILED=Unable to connect to OWA at {0}, status code {1}, check configuration
|
EXCEPTION_CONNECTION_FAILED=Unable to connect to OWA at {0}, status code {1}, check configuration
|
||||||
EXCEPTION_DAVMAIL_CONFIGURATION=DavMail configuration exception: \n{0}
|
EXCEPTION_DAVMAIL_CONFIGURATION=DavMail configuration exception:\n{0}
|
||||||
EXCEPTION_END_OF_STREAM=End of stream reached reading content
|
EXCEPTION_END_OF_STREAM=End of stream reached reading content
|
||||||
EXCEPTION_EVENT_NOT_FOUND=Calendar event not found
|
EXCEPTION_EVENT_NOT_FOUND=Calendar event not found
|
||||||
EXCEPTION_EXCHANGE_LOGIN_FAILED=Exchange login exception: {0}
|
EXCEPTION_EXCHANGE_LOGIN_FAILED=Exchange login exception: {0}
|
||||||
|
@ -3,7 +3,7 @@ EXCEPTION_AUTHENTICATION_FAILED_PASSWORD_EXPIRED=Echec d''authentification : mot
|
|||||||
EXCEPTION_AUTHENTICATION_FAILED_RETRY=Echec d''authentification : identifiant ou mot de passe invalide, réessayer avec domaine\\utilisateur
|
EXCEPTION_AUTHENTICATION_FAILED_RETRY=Echec d''authentification : identifiant ou mot de passe invalide, réessayer avec domaine\\utilisateur
|
||||||
EXCEPTION_AUTHENTICATION_FORM_NOT_FOUND=Formulaire d''authentification non trouvé à l''adresse {0}
|
EXCEPTION_AUTHENTICATION_FORM_NOT_FOUND=Formulaire d''authentification non trouvé à l''adresse {0}
|
||||||
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_DAVMAIL_CONFIGURATION=Erreur de configuration DavMail : \n{0}
|
EXCEPTION_DAVMAIL_CONFIGURATION=Erreur de configuration DavMail :\n{0}
|
||||||
EXCEPTION_END_OF_STREAM=Fin de flux âtteint pendant la lecture du contenu
|
EXCEPTION_END_OF_STREAM=Fin de flux âtteint pendant la lecture du contenu
|
||||||
EXCEPTION_EVENT_NOT_FOUND=Evènement non trouvé
|
EXCEPTION_EVENT_NOT_FOUND=Evènement non trouvé
|
||||||
EXCEPTION_EXCHANGE_LOGIN_FAILED=Exception lors de la connexion Exchange : {0}
|
EXCEPTION_EXCHANGE_LOGIN_FAILED=Exception lors de la connexion Exchange : {0}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user