Consider operations with file not found as unrecoverable

pull/160/head
M66B 5 years ago
parent 4dec43ae27
commit 7db054342d

@ -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) {

@ -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");

Loading…
Cancel
Save