public class AddDeviceCommand implements LocalCommand {
private final static Logger logger = LoggerFactory.getLogger(AddDeviceCommand.class);
@Override
public void attachToSubparser(final Subparser subparser) {
public class AddDeviceCommand implements LocalCommand {
private final static Logger logger = LoggerFactory.getLogger(AddDeviceCommand.class);
@Override
public void attachToSubparser(final Subparser subparser) {
subparser.addArgument("--uri")
.required(true)
.help("Specify the uri contained in the QR code shown by the new device.");
subparser.addArgument("--uri")
.required(true)
.help("Specify the uri contained in the QR code shown by the new device.");
logger.error("Add device link failed", e);
throw new IOErrorException("Add device link failed");
} catch (URISyntaxException e) {
logger.error("Add device link failed", e);
throw new IOErrorException("Add device link failed");
} catch (URISyntaxException e) {
} catch (InvalidKeyException e) {
logger.error("Add device link failed", e);
throw new UnexpectedErrorException("Add device link failed.");
} catch (InvalidKeyException e) {
logger.error("Add device link failed", e);
throw new UnexpectedErrorException("Add device link failed.");