1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-12 18:52:21 -05:00

EWS: improve error logging on invalid character

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1801 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-09-28 09:53:45 +00:00
parent e76582ede7
commit ffb4740fe7

View File

@ -1006,7 +1006,7 @@ public abstract class EWSMethod extends PostMethod {
protected void processResponseStream(InputStream inputStream) {
responseItems = new ArrayList<Item>();
XMLStreamReader reader;
XMLStreamReader reader = null;
try {
inputStream = new FilterInputStream(inputStream) {
int totalCount;
@ -1043,9 +1043,15 @@ public abstract class EWSMethod extends PostMethod {
handleCustom(reader);
}
}
} catch (XMLStreamException e) {
LOGGER.error("Error while parsing soap response: " + e, e);
if (reader != null) {
try {
LOGGER.error("Current text: " + reader.getText());
} catch (IllegalStateException ise) {
LOGGER.error(e+" "+e.getMessage());
}
}
}
if (errorDetail != null) {
LOGGER.debug(errorDetail);