Log error instead of exception to try other COM ports

This commit is contained in:
2016-07-14 08:44:27 +01:00
parent 381befaa41
commit 08a161f45d

View File

@@ -83,7 +83,8 @@ public class Port implements SerialPortEventListener {
System.out.println("Connected on port: " + portid.getName());
serialPort.addEventListener(this);
} catch (UnsupportedCommOperationException | PortInUseException | IOException | TooManyListenersException e) {
throw new ArduinoException("Failed to connect");
logger.error("", new ArduinoException("Failed to connect"));
continue;
}
serialPort.notifyOnDataAvailable(true);
return;