Package jakarta.jms

Class JMSException

    • Constructor Detail

      • JMSException

        public JMSException​(String reason,
                            String errorCode,
                            Exception linkedException)
        Constructs a JMSException with the specified reason, error code and linked exception.
        Parameters:
        reason - a description of the exception
        errorCode - a string specifying the vendor-specific error code
        linkedException - the linked Exception
      • JMSException

        public JMSException​(String reason,
                            String errorCode)
        Constructs a JMSException with the specified reason and error code.
        Parameters:
        reason - a description of the exception
        errorCode - a string specifying the vendor-specific error code
      • JMSException

        public JMSException​(String reason)
        Constructs a JMSException with the specified reason and with the error code defaulting to null.
        Parameters:
        reason - a description of the exception
    • Method Detail

      • getErrorCode

        public String getErrorCode()
        Gets the vendor-specific error code.
        Returns:
        a string specifying the vendor-specific error code
      • getLinkedException

        public Exception getLinkedException()
        Gets the exception linked to this one.
        Returns:
        the linked Exception, null if none
      • setLinkedException

        public void setLinkedException​(Exception ex)
        Adds a linked Exception.
        Parameters:
        ex - the linked Exception