1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -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:
cketti 2012-01-20 19:50:07 +01:00
parent 96b0a7b28b
commit 32a29f131b

View File

@ -989,7 +989,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;
} }
} }
@ -1017,7 +1018,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);
@ -1047,7 +1049,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);