mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-06 09:03:56 +02:00
Refactoring
This commit is contained in:
@@ -593,9 +593,6 @@ public class EmailService implements AutoCloseable {
|
||||
if (ex.getMessage() != null && ex.getMessage().contains("Command Error. 10"))
|
||||
throw new AuthenticationFailedException(context.getString(R.string.title_service_error10), ex);
|
||||
|
||||
if (ConnectionHelper.isAborted(ex))
|
||||
throw new MessagingException(context.getString(R.string.title_service_abort), ex);
|
||||
|
||||
if (purpose == PURPOSE_CHECK) {
|
||||
if (port == 995 && !("pop3".equals(protocol) || "pop3s".equals(protocol)))
|
||||
throw new MessagingException(context.getString(R.string.title_service_port), ex);
|
||||
|
||||
@@ -1758,6 +1758,9 @@ public class Log {
|
||||
ex.getCause() instanceof UnknownHostException)
|
||||
ex = new Throwable("Email server address lookup failed", ex);
|
||||
|
||||
if (ConnectionHelper.isAborted(ex))
|
||||
ex = new Throwable("The server or network actively disconnected the connection", ex);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (BuildConfig.DEBUG)
|
||||
sb.append(new ThrowableWrapper(ex).toSafeString());
|
||||
|
||||
Reference in New Issue
Block a user