From 7917c19d1853c890d08985d29c709f53ec8ae54b Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 30 Aug 2016 13:15:00 +0200 Subject: [PATCH] broader exception catchers --- .../siacs/conversations/xmpp/jingle/JingleInbandTransport.java | 2 +- .../eu/siacs/conversations/services/PushManagementService.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java index 0b0cb4083..38a201bdc 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java @@ -209,7 +209,7 @@ public class JingleInbandTransport extends JingleTransport { } else { connection.updateProgress((int) ((((double) (this.fileSize - this.remainingSize)) / this.fileSize) * 100)); } - } catch (IOException e) { + } catch (Exception e) { Log.d(Config.LOGTAG,account.getJid().toBareJid()+": "+e.getMessage()); FileBackend.close(fileOutputStream); this.onFileTransmissionStatusChanged.onFileTransferAborted(); diff --git a/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java b/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java index 3fdaf8326..ae86f8c26 100644 --- a/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java +++ b/src/playstore/java/eu/siacs/conversations/services/PushManagementService.java @@ -92,7 +92,8 @@ public class PushManagementService { try { String token = instanceID.getToken(mXmppConnectionService.getString(R.string.gcm_defaultSenderId), GoogleCloudMessaging.INSTANCE_ID_SCOPE, null); instanceTokenRetrieved.onGcmInstanceTokenRetrieved(token); - } catch (IOException e) { + } catch (Exception e) { + Log.d(Config.LOGTAG,"unable to get push token"); } } }).start();