Be more verbose about invalid type errors
This commit is contained in:
parent
de70873e96
commit
dd5b3cac0e
|
@ -561,13 +561,11 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
|
|||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(R.string.error_label);
|
||||
if (errorMsg != null) {
|
||||
builder.setMessage(getString(R.string.error_msg_prefix) + errorMsg);
|
||||
builder.setMessage(errorMsg);
|
||||
} else {
|
||||
builder.setMessage(R.string.error_msg_prefix);
|
||||
builder.setMessage(R.string.download_error_error_unknown);
|
||||
}
|
||||
builder.setPositiveButton(android.R.string.ok,
|
||||
(dialog, which) -> dialog.cancel()
|
||||
);
|
||||
builder.setPositiveButton(android.R.string.ok, (dialog, which) -> dialog.cancel());
|
||||
builder.setOnDismissListener(dialog -> {
|
||||
setResult(RESULT_ERROR);
|
||||
finish();
|
||||
|
|
|
@ -36,6 +36,9 @@ public class UnsupportedFeedtypeException extends Exception {
|
|||
if (message != null) {
|
||||
return message;
|
||||
} else if (type == TypeGetter.Type.INVALID) {
|
||||
if ("html".equals(rootElement)) {
|
||||
return "The server returned a website, not a podcast feed";
|
||||
}
|
||||
return "Invalid type";
|
||||
} else {
|
||||
return "Type " + type + " not supported";
|
||||
|
|
Loading…
Reference in New Issue