import org.asamk.signal.OutputType;
import org.asamk.signal.commands.exceptions.CommandException;
import org.asamk.signal.commands.exceptions.IOErrorException;
import org.asamk.signal.commands.exceptions.UserErrorException;
import org.asamk.signal.manager.RegistrationManager;
import org.asamk.signal.manager.api.IncorrectPinException;
import org.asamk.signal.OutputType;
import org.asamk.signal.commands.exceptions.CommandException;
import org.asamk.signal.commands.exceptions.IOErrorException;
import org.asamk.signal.commands.exceptions.UserErrorException;
import org.asamk.signal.manager.RegistrationManager;
import org.asamk.signal.manager.api.IncorrectPinException;
- final VerifyParams request, final RegistrationManager m, final JsonWriter jsonWriter
+ final VerifyParams request,
+ final RegistrationManager m,
+ final JsonWriter jsonWriter
) throws CommandException {
verify(m, request.verificationCode(), request.pin());
}
private void verify(
) throws CommandException {
verify(m, request.verificationCode(), request.pin());
}
private void verify(
- final RegistrationManager m, final String verificationCode, final String pin
+ final RegistrationManager m,
+ final String verificationCode,
+ final String pin
) throws UserErrorException, IOErrorException {
try {
m.verifyAccount(verificationCode, pin);
) throws UserErrorException, IOErrorException {
try {
m.verifyAccount(verificationCode, pin);
+ "\nUse '--pin PIN_CODE' to specify the registration lock PIN");
} catch (IncorrectPinException e) {
throw new UserErrorException("Verification failed! Invalid pin, tries remaining: " + e.getTriesRemaining());
+ "\nUse '--pin PIN_CODE' to specify the registration lock PIN");
} catch (IncorrectPinException e) {
throw new UserErrorException("Verification failed! Invalid pin, tries remaining: " + e.getTriesRemaining());
} catch (IOException e) {
throw new IOErrorException("Verify error: " + e.getMessage(), e);
}
}
} catch (IOException e) {
throw new IOErrorException("Verify error: " + e.getMessage(), e);
}
}