log.log(Level.WARNING, "No response from port {0}", portName);
if (port != null) {
port.stop();
}
port = null;
throw new NoSerialPortFoundException("No response from port "+portName);
} catch (Exception e) {
log.log(Level.WARNING, "Failed to open port {0}: {1}", new Object[] {portName, e});
if (port != null) {
port.stop();
}
port = null;
throw new NoSerialPortFoundException("Failed to open port "+portName+": "+e);
}
}