Revert "LanguageTool: use HttpStatusException"

This reverts commit ea9c2cd2e5.
pull/214/head
M66B 2 years ago
parent 7cf9b1904b
commit 433d18fc7d

@ -60,7 +60,6 @@ import com.google.android.material.snackbar.Snackbar;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -688,7 +687,7 @@ public class FragmentAnswer extends FragmentBase {
@Override @Override
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Throwable exex = new Throwable("LanguageTool", ex); Throwable exex = new Throwable("LanguageTool", ex);
Log.unexpectedError(getParentFragmentManager(), exex, !(ex instanceof IOException)); Log.unexpectedError(getParentFragmentManager(), exex, false);
} }
}.execute(this, args, "answer:lt"); }.execute(this, args, "answer:lt");
} }

@ -3018,7 +3018,7 @@ public class FragmentCompose extends FragmentBase {
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
if (!silent) { if (!silent) {
Throwable exex = new Throwable("LanguageTool", ex); Throwable exex = new Throwable("LanguageTool", ex);
Log.unexpectedError(getParentFragmentManager(), exex, !(ex instanceof IOException)); Log.unexpectedError(getParentFragmentManager(), exex, false);
} }
} }
}.execute(this, args, "compose:lt"); }.execute(this, args, "compose:lt");

@ -39,7 +39,6 @@ import androidx.preference.PreferenceManager;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import org.jsoup.HttpStatusException;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -473,7 +472,7 @@ public class LanguageTool {
Log.w(ex); Log.w(ex);
} }
Log.w("LT " + error); Log.w("LT " + error);
throw new HttpStatusException(error, status, connection.getURL().toString()); throw new IOException(error);
} }
} }

Loading…
Cancel
Save