mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
Improve stderr output
This commit is contained in:
parent
2c3d222e84
commit
2c5a70cc47
6 changed files with 9 additions and 10 deletions
|
@ -43,7 +43,7 @@ public class ListIdentitiesCommand implements LocalCommand {
|
|||
printIdentityFingerprint(m, id);
|
||||
}
|
||||
} catch (InvalidNumberException e) {
|
||||
System.out.println("Invalid number: " + e.getMessage());
|
||||
System.err.println("Invalid number: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -3,11 +3,11 @@ package org.asamk.signal.commands;
|
|||
import net.sourceforge.argparse4j.inf.Namespace;
|
||||
import net.sourceforge.argparse4j.inf.Subparser;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.whispersystems.signalservice.api.util.InvalidNumberException;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class UpdateContactCommand implements LocalCommand {
|
||||
|
||||
@Override
|
||||
|
@ -42,7 +42,8 @@ public class UpdateContactCommand implements LocalCommand {
|
|||
m.setExpirationTimer(number, expiration);
|
||||
}
|
||||
} catch (InvalidNumberException e) {
|
||||
System.out.println("Invalid contact number: " + e.getMessage());
|
||||
System.err.println("Invalid contact number: " + e.getMessage());
|
||||
return 1;
|
||||
} catch (IOException e) {
|
||||
System.err.println("Update contact error: " + e.getMessage());
|
||||
return 3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue