ts = m;
if (m.userExists()) {
try {
- m.load();
+ m.init();
} catch (Exception e) {
System.err.println("Error loading state file \"" + m.getFileName() + "\": " + e.getMessage());
return 2;
} 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;
} catch (InvalidKeyException e) {
e.printStackTrace();
return 2;
+ } catch (AssertionError e) {
+ handleAssertionError(e);
+ return 1;
} catch (URISyntaxException e) {
e.printStackTrace();
return 2;
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();