mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-11 12:40:22 -05:00
Make sure an IOException is always passed through as MessagingException
This is important for the code handling pending actions in MessagingController. If a non-permantent MessagingException is encountered, the pending action is retried later. Fixes issue 3696
This commit is contained in:
parent
03eefaab95
commit
45e7afc60e
@ -892,7 +892,8 @@ public class ImapStore extends Store {
|
|||||||
return true;
|
return true;
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
throw ioExceptionHandler(mConnection, ioe);
|
throw ioExceptionHandler(mConnection, ioe);
|
||||||
} catch (MessagingException me) {
|
} catch (ImapException ie) {
|
||||||
|
// We got a response, but it was not "OK"
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -920,7 +921,8 @@ public class ImapStore extends Store {
|
|||||||
encodeString(encodeFolderName(getPrefixedName()))));
|
encodeString(encodeFolderName(getPrefixedName()))));
|
||||||
mExists = true;
|
mExists = true;
|
||||||
return true;
|
return true;
|
||||||
} catch (MessagingException me) {
|
} catch (ImapException ie) {
|
||||||
|
// We got a response, but it was not "OK"
|
||||||
return false;
|
return false;
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
throw ioExceptionHandler(connection, ioe);
|
throw ioExceptionHandler(connection, ioe);
|
||||||
@ -950,7 +952,8 @@ public class ImapStore extends Store {
|
|||||||
connection.executeSimpleCommand(String.format("CREATE %s",
|
connection.executeSimpleCommand(String.format("CREATE %s",
|
||||||
encodeString(encodeFolderName(getPrefixedName()))));
|
encodeString(encodeFolderName(getPrefixedName()))));
|
||||||
return true;
|
return true;
|
||||||
} catch (MessagingException me) {
|
} catch (ImapException ie) {
|
||||||
|
// We got a response, but it was not "OK"
|
||||||
return false;
|
return false;
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
throw ioExceptionHandler(mConnection, ioe);
|
throw ioExceptionHandler(mConnection, ioe);
|
||||||
|
Loading…
Reference in New Issue
Block a user