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:
parent
8e55622a52
commit
565f037df2
@ -1743,7 +1743,7 @@ public class ExchangeSession {
|
|||||||
* @throws IOException on error
|
* @throws IOException on error
|
||||||
*/
|
*/
|
||||||
public String getICS() throws IOException {
|
public String getICS() throws IOException {
|
||||||
String result = null;
|
String result;
|
||||||
LOGGER.debug("Get event: " + permanentUrl);
|
LOGGER.debug("Get event: " + permanentUrl);
|
||||||
// try to get PR_INTERNET_CONTENT
|
// try to get PR_INTERNET_CONTENT
|
||||||
try {
|
try {
|
||||||
@ -1760,15 +1760,21 @@ public class ExchangeSession {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (DavException e) {
|
} catch (DavException e) {
|
||||||
LOGGER.warn("Unable to get event at " + permanentUrl + ": " + e.getMessage());
|
throw buildHttpException(e);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.warn("Unable to get event at " + permanentUrl + ": " + e.getMessage());
|
throw buildHttpException(e);
|
||||||
} catch (MessagingException e) {
|
} catch (MessagingException e) {
|
||||||
LOGGER.warn("Unable to get event at " + permanentUrl + ": " + e.getMessage());
|
throw buildHttpException(e);
|
||||||
}
|
}
|
||||||
return result;
|
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).
|
* Get event name (file name part in URL).
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user