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