aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java b/src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java
index b5fc88bdd..fc691057d 100644
--- a/src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java
@@ -13,6 +13,9 @@ import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.services.XmppConnectionService;
+import eu.siacs.conversations.xmpp.jid.InvalidJidException;
+import eu.siacs.conversations.xmpp.jid.Jid;
+
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
@@ -89,10 +92,13 @@ public class ExceptionHelper {
Log.d(Config.LOGTAG, "using account="
+ finalAccount.getJid()
+ " to send in stack trace");
- Conversation conversation = service
- .findOrCreateConversation(finalAccount,
- "bugs@siacs.eu", false);
- Message message = new Message(conversation, report
+ Conversation conversation = null;
+ try {
+ conversation = service.findOrCreateConversation(finalAccount,
+ Jid.fromString("bugs@siacs.eu"), false);
+ } catch (final InvalidJidException ignored) {
+ }
+ Message message = new Message(conversation, report
.toString(), Message.ENCRYPTION_NONE);
service.sendMessage(message);
}
@@ -103,15 +109,12 @@ public class ExceptionHelper {
@Override
public void onClick(DialogInterface dialog, int which) {
preferences.edit().putBoolean("never_send", true)
- .commit();
+ .apply();
}
});
builder.create().show();
- } catch (FileNotFoundException e) {
- return;
- } catch (IOException e) {
- return;
- }
+ } catch (final IOException ignored) {
+ }
}
}