Package jssc

Class SerialPortException

    • Constructor Detail

      • SerialPortException

        public SerialPortException​(SerialPort port,
                                   String methodName,
                                   String exceptionType)
        Constructs a new SerialPortException
        Parameters:
        port - Port which the exception occurred on
        methodName - Method name which the exception occurred on
        exceptionType - Any SerialPortException.TYPE_*
      • SerialPortException

        @Deprecated
        public SerialPortException​(String portName,
                                   String methodName,
                                   String exceptionType)
        Deprecated.
        Constructs a new SerialPortException Deprecated: Use SerialPortTimeoutException(SerialPort, String, String) instead.
        Parameters:
        portName - Port which the exception occurred on
        methodName - Method name which the exception occurred on
        exceptionType - Any SerialPortException.TYPE_*
        See Also:
        SerialPortException(SerialPort, String, String)
    • Method Detail

      • getPortName

        @Deprecated
        public String getPortName()
        Deprecated.
        Getting port name during operation with which the exception was called Deprecated: Use getPort().getName() instead.
        Returns:
        Port name
      • getPort

        public SerialPort getPort()
        Gets the SerialPort which threw the exception
        Returns:
        SerialPort object
      • getMethodName

        public String getMethodName()
        Gets the method name during execution of which the exception was called
        Returns:
        Calling method name
      • getExceptionType

        public String getExceptionType()
        Getting exception type
        Returns:
        a value from SerialPortException.TYPE_* or a custom String value if provided