Consider operations with file not found as unrecoverable

This commit is contained in:
M66B
2019-07-29 07:47:11 +02:00
parent 4dec43ae27
commit 7db054342d
2 changed files with 4 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ import org.jsoup.nodes.Element;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -263,6 +264,7 @@ class Core {
if (ex instanceof OutOfMemoryError ||
ex instanceof MessageRemovedException ||
ex instanceof FileNotFoundException ||
ex instanceof FolderNotFoundException ||
ex instanceof IllegalArgumentException ||
ex.getCause() instanceof CommandFailedException) {

View File

@@ -36,6 +36,7 @@ import androidx.core.content.ContextCompat;
import androidx.lifecycle.Observer;
import androidx.preference.PreferenceManager;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.Inet4Address;
import java.net.Inet6Address;
@@ -166,6 +167,7 @@ public class ServiceSend extends ServiceBase {
if (ex instanceof OutOfMemoryError ||
ex instanceof MessageRemovedException ||
ex instanceof FileNotFoundException ||
ex instanceof SendFailedException ||
ex instanceof IllegalArgumentException) {
Log.w("Unrecoverable");