Sanitize IOException/MessageRemovedException

This commit is contained in:
M66B 2019-06-15 10:29:09 +02:00
parent 1939d28a2d
commit 07106a6ef9
1 changed files with 7 additions and 0 deletions

View File

@ -390,12 +390,19 @@ public class Helper {
if (sanitize) { if (sanitize) {
if (ex instanceof MessageRemovedException) if (ex instanceof MessageRemovedException)
return null; return null;
if (ex instanceof IOException &&
ex.getCause() instanceof MessageRemovedException)
return null;
if (ex instanceof FolderClosedException) if (ex instanceof FolderClosedException)
return null; return null;
if (ex instanceof IllegalStateException && if (ex instanceof IllegalStateException &&
("Not connected".equals(ex.getMessage()) || ("Not connected".equals(ex.getMessage()) ||
"This operation is not allowed on a closed folder".equals(ex.getMessage()))) "This operation is not allowed on a closed folder".equals(ex.getMessage())))
return null; return null;
//if (ex instanceof MailConnectException && ex.getCause() instanceof UnknownHostException) //if (ex instanceof MailConnectException && ex.getCause() instanceof UnknownHostException)
// return null; // return null;
} }