show error messages when feed downloading is not successful.

This commit is contained in:
Kevin Meyer 2014-11-13 20:56:06 +01:00
parent cb2c1dc04b
commit 231f4c0efb
3 changed files with 10 additions and 1 deletions

View File

@ -497,8 +497,15 @@ public class Poche extends Activity {
}
}
}
showToast(getString(R.string.txtSyncDone));
} else {
// HTTP Connection not successful
if (urlConnection == null) {
showErrorMessage(getString(R.string.error_feed));
} else {
showErrorMessage(getString(R.string.error_feed) + ":\n" + urlConnection.getResponseCode() + " " + urlConnection.getResponseMessage());
}
}
updateUnread();
} catch (Exception e) {
e.printStackTrace();

View File

@ -20,4 +20,5 @@
<string name="txtAPIUsername"><b><u>Deine User ID:</u></b></string>
<string name="txtAPIToken"><b><u>Dein Token:</u></b></string>
<string name="error">Fehler</string>
<string name="error_feed">Fehler beim laden des Feeds</string>
</resources>

View File

@ -20,4 +20,5 @@
<string name="txtAPIUsername"><b><u>Your User ID:</u></b></string>
<string name="txtAPIToken"><b><u>Your Token:</u></b></string>
<string name="error">Error</string>
<string name="error_feed">Error loading feed</string>
</resources>