- System.err.println("Verification failed! This number is locked with a pin. Hours remaining until reset: "
- + (e.getTimeRemaining() / 1000 / 60 / 60));
- System.err.println("Use '--pin PIN_CODE' to specify the registration lock PIN");
- return 3;
+ throw new UserErrorException(
+ "Verification failed! This number is locked with a pin. Hours remaining until reset: "
+ + (e.getTimeRemaining() / 1000 / 60 / 60)
+ + "\nUse '--pin PIN_CODE' to specify the registration lock PIN");
+ } catch (KeyBackupServicePinException e) {
+ throw new UserErrorException("Verification failed! Invalid pin, tries remaining: " + e.getTriesRemaining());
+ } catch (KeyBackupSystemNoDataException e) {
+ throw new UnexpectedErrorException("Verification failed! No KBS data.", e);