Add error message to exception

This commit is contained in:
Mikel 2017-08-18 20:04:59 +01:00
parent f2e8891db9
commit 591b10f4c9

View file

@ -39,7 +39,8 @@ public abstract class AuthenticatedActivity extends NavigationBaseActivity {
.map(AccountManagerFuture::getResult)
.doOnEvent((bundle, throwable) -> {
if (bundle.containsKey(AccountManager.KEY_ACCOUNT_NAME)) {
throw new RuntimeException();
throw new RuntimeException("Bundle doesn't contain account-name key: "
+ AccountManager.KEY_ACCOUNT_NAME);
}
})
.map(bundle -> bundle.getString(AccountManager.KEY_ACCOUNT_NAME))