Menu

#1 500 errors are not skipped

open
nobody
None
5
2009-06-10
2009-06-10
radobobo
No

If you have a message with a 500 error from OWA then it will crash. Here is a patch to fix this by skipping the message and running the rest.

Index: src/fetchExc/MailFetcher.java

--- src/fetchExc/MailFetcher.java (revision 22)
+++ src/fetchExc/MailFetcher.java (working copy)
@@ -299,10 +299,14 @@
break;
}
}
- try {
- sentOk = send.processMessage((files.get(k)).getFromaddr(), get.getResponseBodyAsStream());
- } catch (IOException ioe) {
- System.err.println("IO error in fetchAll():"+ioe.getMessage());
+ if(status==500)
+ System.out.println("500 error for message");
+ else {
+ try {
+ sentOk = send.processMessage((files.get(k)).getFromaddr(), get.getResponseBodyAsStream());
+ } catch (IOException ioe) {
+ System.err.println("IO error in fetchAll():"+ioe.getMessage());
+ }
}
}
if (sentOk) {

Discussion


Log in to post a comment.