1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 11:12:22 -05:00

Caldav: catch any exception in reportItems

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1221 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-07-20 10:46:44 +00:00
parent bb1b0047b4
commit 2f82daa48f
3 changed files with 11 additions and 10 deletions

View File

@ -249,7 +249,7 @@ public class CaldavConnection extends AbstractConnection {
} else if (request.isPropPatch()) {
patchCalendar(request);
} else if (request.isReport()) {
reportEvents(request);
reportItems(request);
// event requests
} else if (request.isPut()) {
String etag = request.getHeader("if-match");
@ -643,12 +643,12 @@ public class CaldavConnection extends AbstractConnection {
}
/**
* Report events listed in request.
* Report items listed in request.
*
* @param request Caldav request
* @throws IOException on error
*/
public void reportEvents(CaldavRequest request) throws IOException {
public void reportItems(CaldavRequest request) throws IOException {
String folderPath = request.getFolderPath();
List<ExchangeSession.Event> events;
List<String> notFound = new ArrayList<String>();
@ -659,7 +659,7 @@ public class CaldavConnection extends AbstractConnection {
int count = 0;
int total = request.getHrefs().size();
for (String href : request.getHrefs()) {
DavGatewayTray.debug(new BundleMessage("LOG_REPORT_EVENT", ++count, total));
DavGatewayTray.debug(new BundleMessage("LOG_REPORT_ITEM", ++count, total));
DavGatewayTray.switchIcon();
String eventName = getEventFileNameFromPath(href);
try {
@ -670,8 +670,9 @@ public class CaldavConnection extends AbstractConnection {
item = session.getItem(folderPath, eventName);
appendItemResponse(response, request, item);
}
} catch (HttpException e) {
DavGatewayTray.warn(new BundleMessage("LOG_EVENT_NOT_AVAILABLE", eventName, href));
} catch (Exception e) {
wireLogger.debug(e);
DavGatewayTray.warn(new BundleMessage("LOG_ITEM_NOT_AVAILABLE", eventName, href));
notFound.add(href);
}
}

View File

@ -48,7 +48,7 @@ LOG_ERROR_LOADING_OSXADAPTER=Error while loading the OSXAdapter
LOG_ERROR_LOADING_SETTINGS=Error loading settings
LOG_ERROR_RETRIEVING_MESSAGE=Error retreiving message
LOG_ERROR_WAITING_FOR_SWT_INIT=Error waiting for SWT init
LOG_EVENT_NOT_AVAILABLE=Event {0} not available: {1}
LOG_ITEM_NOT_AVAILABLE=Item {0} not available: {1}
LOG_EXCEPTION_CLOSING_CLIENT_INPUT_STREAM=Exception closing client input stream
LOG_EXCEPTION_CLOSING_CLIENT_OUTPUT_STREAM=Exception closing client output stream
LOG_EXCEPTION_CLOSING_CLIENT_SOCKET=Exception closing client socket
@ -104,7 +104,7 @@ LOG_READ_CLIENT_LINE=< {0}
LOG_READ_CLIENT_LOGIN=< LOGIN ********
LOG_READ_CLIENT_PASS=< PASS ********
LOG_READ_CLIENT_PASSWORD=< ********
LOG_REPORT_EVENT=Report event {0}/{1}
LOG_REPORT_ITEM=Report item {0}/{1}
LOG_GATEWAY_INTERRUPTED=Stopping DavMail gateway
LOG_GATEWAY_STOP=DavMail gateway stopped
LOG_SEARCHING_CALENDAR_MESSAGES=Searching calendar messages...

View File

@ -45,7 +45,7 @@ LOG_ERROR_LOADING_OSXADAPTER=Erreur au chargement de OSXAdapter
LOG_ERROR_LOADING_SETTINGS=Erreur de chargement de la configuration
LOG_ERROR_RETRIEVING_MESSAGE=Erreur lors la récupération du message
LOG_ERROR_WAITING_FOR_SWT_INIT=Erreur d''initialisation SWT
LOG_EVENT_NOT_AVAILABLE=Evènement {0} non disponible : {1}
LOG_ITEM_NOT_AVAILABLE=Evènement {0} non disponible : {1}
LOG_EXCEPTION_CLOSING_CLIENT_INPUT_STREAM=Erreur à la fermeture du flux d''entrée client
LOG_EXCEPTION_CLOSING_CLIENT_OUTPUT_STREAM=Erreur à la fermeture du flux de sortie client
LOG_EXCEPTION_CLOSING_CLIENT_SOCKET=Erreur à la fermeture de la connection client
@ -98,7 +98,7 @@ LOG_READ_CLIENT_LINE=< {0}
LOG_READ_CLIENT_LOGIN=< LOGIN ********
LOG_READ_CLIENT_PASS=< PASS ********
LOG_READ_CLIENT_PASSWORD=< ********
LOG_REPORT_EVENT=Envoi évènement {0}/{1}
LOG_REPORT_ITEM=Envoi élément {0}/{1}
LOG_SEARCHING_CALENDAR_MESSAGES=Recherche des messages de calendrier...
LOG_SEARCH_QUERY=Recherche : {0}
LOG_SEND_CLIENT_MESSAGE=> {0}