Handle IO exceptions with underlying messaging exception

This commit is contained in:
M66B
2018-12-21 16:50:02 +01:00
parent 9f623cb3d7
commit b6ecb416f8
3 changed files with 31 additions and 6 deletions

View File

@@ -575,6 +575,11 @@ public class MessageHelper {
for (int i = 0; i < multipart.getCount(); i++)
result.addAll(getAttachments(multipart.getBodyPart(i)));
}
} catch (IOException ex) {
if (ex.getCause() instanceof MessagingException)
Log.w(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
else
throw ex;
} catch (ParseException ex) {
Log.w(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
}