[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix possible crash when edit preview times out.

2016-12-13 Thread jenkins-bot (Code Review)
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 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix possible crash when edit preview times out.

2016-12-12 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
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(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/49/326849/1

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..acf243d 100644
--- a/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
+++ b/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
@@ -334,9 +334,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: newchange
Gerrit-Change-Id: I2a79a9ca9d6b7454c13e6971f826b2d3bc2f7301
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 

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