- m.setRegistrationLockPin(Optional.absent());
- return 0;
- } catch (IOException | UnauthenticatedResponseException e) {
- System.err.println("Remove pin error: " + e.getMessage());
- return 3;
+ m.setRegistrationLockPin(Optional.empty());
+ } catch (IOException e) {
+ throw new IOErrorException("Remove pin error: " + e.getMessage(), e);
+ } catch (NotMasterDeviceException e) {
+ throw new UserErrorException("This command doesn't work on linked devices.");