1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-14 03:32:22 -05:00

Caldav: Improve error handling on invalid events

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@875 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-12-07 21:57:56 +00:00
parent 8e55622a52
commit 565f037df2

View File

@ -1743,7 +1743,7 @@ public class ExchangeSession {
* @throws IOException on error
*/
public String getICS() throws IOException {
String result = null;
String result;
LOGGER.debug("Get event: " + permanentUrl);
// try to get PR_INTERNET_CONTENT
try {
@ -1760,15 +1760,21 @@ public class ExchangeSession {
}
}
} catch (DavException e) {
LOGGER.warn("Unable to get event at " + permanentUrl + ": " + e.getMessage());
throw buildHttpException(e);
} catch (IOException e) {
LOGGER.warn("Unable to get event at " + permanentUrl + ": " + e.getMessage());
throw buildHttpException(e);
} catch (MessagingException e) {
LOGGER.warn("Unable to get event at " + permanentUrl + ": " + e.getMessage());
throw buildHttpException(e);
}
return result;
}
protected HttpException buildHttpException(Exception e) {
String message = "Unable to get event "+getName()+" at " + permanentUrl + ": " + e.getMessage();
LOGGER.warn(message);
return new HttpException(message);
}
/**
* Get event name (file name part in URL).
*