Improve HttpException error logging

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@735 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-09-21 21:50:47 +00:00
parent 07569c5583
commit 6164b00290
1 changed files with 9 additions and 3 deletions

View File

@ -379,10 +379,16 @@ public final class DavGatewayHttpClientFacade {
int status = method.getStatusCode();
// 440 means forbidden on Exchange
if (status == 440) {
return new HttpException(HttpStatus.SC_FORBIDDEN + " " + HttpStatus.getStatusText(HttpStatus.SC_FORBIDDEN));
} else {
return new HttpException(method.getStatusCode() + " " + method.getStatusText());
status = HttpStatus.SC_FORBIDDEN;
}
StringBuilder message = new StringBuilder();
message.append(status).append(' ').append(method.getStatusText());
try {
message.append(" at ").append(method.getURI().getURI());
} catch (URIException e) {
message.append(method.getPath());
}
return new HttpException();
}
/**