Improved error messages

pull/162/head
M66B 5 years ago
parent cfeb673c4b
commit a6721bf0b9

@ -712,6 +712,10 @@ The error *... Read timed out ...* means that the email server is not responding
The error *... Failed to load IMAP envelope ...* is caused by a bug in the IMAP server of your provider.
One or more messages could not be retrieved due to an unrecoverable error in the IMAP protocol.
The error *Account not found* means that a previously selected Gmail account was not found anymore, see also [this FAQ](#user-content-faq136).
The error *No token on refresh* means that no token was returned on refreshing the authentication of Gmail account, see also [this FAQ](#user-content-faq136).
See [here](https://linux.die.net/man/3/connect) for what error codes like EHOSTUNREACH and ETIMEDOUT mean.
Possible causes are:

@ -199,13 +199,13 @@ public class MailService implements AutoCloseable {
am.invalidateAuthToken(type, password);
String token = am.blockingGetAuthToken(account, getAuthTokenType(type), true);
if (token == null)
throw new IllegalArgumentException("no token");
throw new IllegalArgumentException("No token on refresh");
_connect(context, host, port, user, token);
return token;
}
throw new IllegalArgumentException("no account");
throw new IllegalArgumentException("Account not found");
} catch (Throwable ex1) {
Log.e(ex1);
throw ex;

Loading…
Cancel
Save