Small improvements

This commit is contained in:
M66B 2019-05-14 19:57:01 +02:00
parent fbc7961705
commit d53de58bc2
2 changed files with 3 additions and 1 deletions

View File

@ -57,6 +57,7 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.util.ArrayList;
import java.util.Arrays;
@ -191,6 +192,7 @@ public class ApplicationEx extends Application {
if (ex instanceof MessagingException &&
(ex.getCause() instanceof IOException ||
ex.getCause() instanceof ConnectionException ||
ex.getCause() instanceof SocketException ||
ex.getCause() instanceof SocketTimeoutException ||
ex.getCause() instanceof ProtocolException))
return false;

View File

@ -753,7 +753,7 @@ class Core {
if (!found) {
db.attachment().setError(local.id, "Attachment not found");
if (!EntityFolder.DRAFTS.equals(folder.type))
throw new IllegalArgumentException("Attachment not found");
throw new IllegalArgumentException("Attachment not found: " + local);
}
updateMessageSize(context, message.id);