mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 19:35:10 +01:00
Small improvements
This commit is contained in:
@@ -50,7 +50,6 @@ import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
import org.jsoup.select.Elements;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
@@ -235,7 +234,7 @@ public class DeepL {
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
throw new FileNotFoundException(error);
|
||||
throw new IOException(error);
|
||||
}
|
||||
|
||||
String response = Helper.readStream(connection.getInputStream());
|
||||
@@ -243,7 +242,7 @@ public class DeepL {
|
||||
JSONObject jroot = new JSONObject(response);
|
||||
JSONArray jtranslations = jroot.getJSONArray("translations");
|
||||
if (jtranslations.length() == 0)
|
||||
throw new FileNotFoundException();
|
||||
throw new IOException();
|
||||
JSONObject jtranslation = (JSONObject) jtranslations.get(0);
|
||||
|
||||
Translation result = new Translation();
|
||||
@@ -292,7 +291,7 @@ public class DeepL {
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
throw new FileNotFoundException(error);
|
||||
throw new IOException(error);
|
||||
}
|
||||
|
||||
String response = Helper.readStream(connection.getInputStream());
|
||||
|
||||
Reference in New Issue
Block a user