]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/Main.java
Use nio Files.delete instead of File.delete everywhere
[signal-cli] / src / main / java / org / asamk / signal / Main.java
index 5dd471f94f4fa1d25dc0cc66b2c29d4894f74aea..b2550fe75544771269c85e7301129b5c8ba8bc78 100644 (file)
@@ -177,6 +177,9 @@ public class Main {
                     } catch (IOException e) {
                         System.err.println("Link request error: " + e.getMessage());
                         return 3;
+                    } catch (AssertionError e) {
+                        handleAssertionError(e);
+                        return 1;
                     } catch (InvalidKeyException e) {
                         e.printStackTrace();
                         return 2;
@@ -202,6 +205,9 @@ public class Main {
                     } catch (InvalidKeyException e) {
                         e.printStackTrace();
                         return 2;
+                    } catch (AssertionError e) {
+                        handleAssertionError(e);
+                        return 1;
                     } catch (URISyntaxException e) {
                         e.printStackTrace();
                         return 2;
@@ -221,8 +227,8 @@ public class Main {
                         for (DeviceInfo d : devices) {
                             System.out.println("Device " + d.getId() + (d.getId() == m.getDeviceId() ? " (this device)" : "") + ":");
                             System.out.println(" Name: " + d.getName());
-                            System.out.println(" Created: " + d.getCreated());
-                            System.out.println(" Last seen: " + d.getLastSeen());
+                            System.out.println(" Created: " + formatTimestamp(d.getCreated()));
+                            System.out.println(" Last seen: " + formatTimestamp(d.getLastSeen()));
                         }
                     } catch (IOException e) {
                         e.printStackTrace();