From 001da15a334e0cfa4d8e82fcc3e65d276c1c5233 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 26 Oct 2019 19:39:41 +0200 Subject: catch all exceptions when closing closable --- src/main/java/de/pixart/messenger/persistance/FileBackend.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/de/pixart') diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java index e34cb9074..5f66850e3 100644 --- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java @@ -1397,7 +1397,8 @@ public class FileBackend { if (stream != null) { try { stream.close(); - } catch (IOException e) { + } catch (Exception e) { + Log.d(Config.LOGTAG, "unable to close stream", e); } } } @@ -1407,6 +1408,7 @@ public class FileBackend { try { socket.close(); } catch (IOException e) { + Log.d(Config.LOGTAG, "unable to close socket", e); } } } @@ -1416,6 +1418,7 @@ public class FileBackend { try { socket.close(); } catch (IOException e) { + Log.d(Config.LOGTAG, "unable to close socket", e); } } } -- cgit v1.2.3