jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326849 )

Change subject: Fix possible crash when edit preview times out.
......................................................................


Fix possible crash when edit preview times out.

https://rink.hockeyapp.net/manage/apps/226649/app_versions/113/crash_reasons/148711407

The "failure" callback of the edit preview request was checking whether
the caught exception was an instance of ApiException, which was OK prior
to switching to Retrofit, since ApiException used to encompass socket
timeouts that happened within the java-mwapi library. But now, the caught
exception can itself be a SocketTimeoutException, among others. The check
for ApiException is no longer necessary.

Change-Id: I2a79a9ca9d6b7454c13e6971f826b2d3bc2f7301
---
M app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
1 file changed, 0 insertions(+), 4 deletions(-)

Approvals:
  Niedzielski: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java 
b/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
index 6d1ef37..aea069a 100644
--- a/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
+++ b/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
@@ -19,7 +19,6 @@
 
 import org.json.JSONException;
 import org.json.JSONObject;
-import org.mediawiki.api.json.ApiException;
 import org.wikipedia.NightModeHandler;
 import org.wikipedia.R;
 import org.wikipedia.ViewAnimations;
@@ -334,9 +333,6 @@
                 }
                 progressDialog.dismiss();
 
-                if (!(caught instanceof ApiException)) {
-                    throw new RuntimeException(caught);
-                }
                 L.d(caught);
                 final AlertDialog retryDialog = new 
AlertDialog.Builder(getActivity())
                         .setMessage(R.string.error_network_error)

-- 
To view, visit https://gerrit.wikimedia.org/r/326849
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a79a9ca9d6b7454c13e6971f826b2d3bc2f7301
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <dbr...@wikimedia.org>
Gerrit-Reviewer: BearND <bsitzm...@wikimedia.org>
Gerrit-Reviewer: Mholloway <mhollo...@wikimedia.org>
Gerrit-Reviewer: Niedzielski <sniedziel...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to