1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -05:00

When showing the root cause of a controller failure, show a better

message if the exception wasn't generated internally
This commit is contained in:
Jesse Vincent 2011-03-09 22:43:36 -05:00
parent a54cf7a757
commit daf04c2a9c

View File

@ -1787,7 +1787,11 @@ public class MessagingController implements Runnable {
rootCause = nextCause; rootCause = nextCause;
} }
} while (nextCause != null); } while (nextCause != null);
return rootCause.getMessage(); if (rootCause instanceof MessagingException) {
return rootCause.getMessage();
} else {
return rootCause.toString();
}
} }
private void queuePendingCommand(Account account, PendingCommand command) { private void queuePendingCommand(Account account, PendingCommand command) {