Add catch for java.rmi.ConnectException which nests java.net.ConnectException to the loops calling m.close() and s.close() in Robot.close()
These are thrown if the robot is turned off when the code tries to shut it down.
Maybe also add this same handling to generic thread managers to tell users robot appears disconnected or similar on connection timeout.
Add catch for
java.rmi.ConnectExceptionwhich nestsjava.net.ConnectExceptionto the loops callingm.close()ands.close()inRobot.close()These are thrown if the robot is turned off when the code tries to shut it down.
Maybe also add this same handling to generic thread managers to tell users robot appears disconnected or similar on connection timeout.