import org.asamk.TextSecure;
import org.freedesktop.dbus.DBusConnection;
import org.freedesktop.dbus.exceptions.DBusException;
+import org.freedesktop.dbus.exceptions.DBusExecutionException;
import org.whispersystems.textsecure.api.crypto.UntrustedIdentityException;
import org.whispersystems.textsecure.api.messages.*;
import org.whispersystems.textsecure.api.messages.multidevice.TextSecureSyncMessage;
handleEncapsulatedExceptions(e);
} catch (AssertionError e) {
handleAssertionError(e);
+ } catch (DBusExecutionException e) {
+ handleDBusExecutionException(e);
}
} else {
String messageText = ns.getString("message");
System.err.println("Failed to add attachment: " + e.getMessage());
System.err.println("Aborting sending.");
System.exit(1);
+ } catch (DBusExecutionException e) {
+ handleDBusExecutionException(e);
}
}
System.exit(1);
}
+ private static void handleDBusExecutionException(DBusExecutionException e) {
+ System.err.println("Cannot connect to dbus: " + e.getMessage());
+ System.err.println("Aborting.");
+ System.exit(1);
+ }
+
private static byte[] decodeGroupId(String groupId) {
try {
return Base64.decode(groupId);