If port name == null, exception with TYPE_NULL_NOT_PERMITTED will be thrown. Previous code with throwing TYPE_PORT_NOT_FOUND exception not a good idea as I think
This commit is contained in:
parent
2819f0ceaf
commit
821c2a1884
|
@ -144,7 +144,7 @@ public class SerialPort {
|
|||
portHandle = serialInterface.openPort(portName);
|
||||
}
|
||||
else {
|
||||
portHandle = -2;//->Since 2.1.0 NULL port name fix
|
||||
throw new SerialPortException(portName, "openPort()", SerialPortException.TYPE_NULL_NOT_PERMITTED);//since 2.1.0 -> NULL port name fix
|
||||
}
|
||||
//since 0.9.0 ->
|
||||
if(portHandle == -1){
|
||||
|
|
Loading…
Reference in New Issue