Improve stderr output

This commit is contained in:
AsamK 2020-08-09 15:11:09 +02:00
parent 2c3d222e84
commit 2c5a70cc47
6 changed files with 9 additions and 10 deletions

View file

@ -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;