From a2fbd71943c530e9357f21e15e0b9010349f6117 Mon Sep 17 00:00:00 2001 From: mguessan Date: Thu, 6 Jan 2011 23:08:11 +0000 Subject: [PATCH] EWS: return HttpNotFoundException on event not found to trigger Lightning workaround git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1601 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ews/EwsExchangeSession.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java/davmail/exchange/ews/EwsExchangeSession.java b/src/java/davmail/exchange/ews/EwsExchangeSession.java index 144c57ad..748fc059 100644 --- a/src/java/davmail/exchange/ews/EwsExchangeSession.java +++ b/src/java/davmail/exchange/ews/EwsExchangeSession.java @@ -1406,7 +1406,7 @@ public class EwsExchangeSession extends ExchangeSession { public Item getItem(String folderPath, String itemName) throws IOException { EWSMethod.Item item = getEwsItem(folderPath, itemName); if (item == null) { - throw new DavMailException("EXCEPTION_ITEM_NOT_FOUND"); + throw new HttpNotFoundException(itemName + " not found in "+folderPath); } String itemType = item.type; @@ -1420,7 +1420,7 @@ public class EwsExchangeSession extends ExchangeSession { executeMethod(getItemMethod); item = getItemMethod.getResponseItem(); if (item == null) { - throw new DavMailException("EXCEPTION_ITEM_NOT_FOUND"); + throw new HttpNotFoundException(itemName + " not found in "+folderPath); } return new Contact(item); } else if ("CalendarItem".equals(itemType) @@ -1429,7 +1429,7 @@ public class EwsExchangeSession extends ExchangeSession { || "Message".equals(itemType)) { return new Event(item); } else { - throw new DavMailException("EXCEPTION_ITEM_NOT_FOUND"); + throw new HttpNotFoundException(itemName + " not found in "+folderPath); } }