X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/6843643aad90a6ba6380e297411f8b6e487946e1..9ffacfe90e54a86da289d3e6fb3c3df738f57abb:/lib/src/main/java/org/asamk/signal/manager/SignalAccountFiles.java diff --git a/lib/src/main/java/org/asamk/signal/manager/SignalAccountFiles.java b/lib/src/main/java/org/asamk/signal/manager/SignalAccountFiles.java index 95fd453d..9d0b344a 100644 --- a/lib/src/main/java/org/asamk/signal/manager/SignalAccountFiles.java +++ b/lib/src/main/java/org/asamk/signal/manager/SignalAccountFiles.java @@ -12,6 +12,7 @@ import org.asamk.signal.manager.util.KeyUtils; import org.signal.libsignal.protocol.util.KeyHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.whispersystems.signalservice.api.push.exceptions.DeprecatedVersionException; import java.io.File; import java.io.IOException; @@ -65,6 +66,9 @@ public class SignalAccountFiles { } catch (NotRegisteredException | IOException | AccountCheckException e) { logger.warn("Ignoring {}: {} ({})", a.number(), e.getMessage(), e.getClass().getSimpleName()); return null; + } catch (Throwable e) { + logger.error("Failed to load {}: {} ({})", a.number(), e.getMessage(), e.getClass().getSimpleName()); + throw e; } }).filter(Objects::nonNull).toList(); @@ -111,6 +115,9 @@ public class SignalAccountFiles { try { manager.checkAccountState(); + } catch (DeprecatedVersionException e) { + manager.close(); + throw new AccountCheckException("signal-cli version is too old for the Signal-Server, please update."); } catch (IOException e) { manager.close(); throw new AccountCheckException("Error while checking account " + number + ": " + e.getMessage(), e);