forked from I2P_Developers/i2p.i2p
Susimail: Don't let an exception on one mail break others
This commit is contained in:
@@ -118,6 +118,8 @@ class Mail {
|
||||
part = new MailPart(rb);
|
||||
} catch (DecodingException de) {
|
||||
Debug.debug(Debug.ERROR, "Decode error: " + de);
|
||||
} catch (Exception e) {
|
||||
Debug.debug(Debug.ERROR, "Parse error: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -282,6 +282,9 @@ class PersistentMailCache {
|
||||
} catch (IOException ioe) {
|
||||
Debug.debug(Debug.ERROR, "Error reading: " + f + ": " + ioe);
|
||||
return null;
|
||||
} catch (OutOfMemoryError oom) {
|
||||
Debug.debug(Debug.ERROR, "Error reading: " + f + ": " + oom);
|
||||
return null;
|
||||
} finally {
|
||||
if (in != null)
|
||||
try { in.close(); } catch (IOException ioe) {}
|
||||
|
@@ -237,9 +237,15 @@ public class POP3MailBox implements NewMailListener {
|
||||
Integer idObj = Integer.valueOf(id);
|
||||
ReadBuffer body = null;
|
||||
if (id >= 1 && id <= mails) {
|
||||
body = sendCmdN( "RETR " + id );
|
||||
if (body == null)
|
||||
Debug.debug( Debug.DEBUG, "RETR returned null" );
|
||||
try {
|
||||
body = sendCmdN( "RETR " + id );
|
||||
if (body == null)
|
||||
Debug.debug( Debug.DEBUG, "RETR returned null" );
|
||||
} catch (OutOfMemoryError oom) {
|
||||
Debug.debug( Debug.ERROR, "OOM fetching mail" );
|
||||
lastError = oom.toString();
|
||||
close();
|
||||
}
|
||||
}
|
||||
else {
|
||||
lastError = "Message id out of range.";
|
||||
|
Reference in New Issue
Block a user