Class IndicationException

    • Constructor Detail

      • IndicationException

        protected IndicationException​(Indication ind,
                                      int nativeErrorCode)
        This constructor is used by JNI and subclasses to create a new object that refers to an Indication object.
        Parameters:
        ind - the Indication which provoked the exception
        nativeErrorCode - the error status returned by the DSAPI layer (which may be zero)
      • IndicationException

        protected IndicationException​(java.lang.String message)
        Constructor provided to let subclasses instantiate themselves without needing a native Indication object
        Parameters:
        message - information about the reason for the exception
    • Method Detail

      • getErrorType

        public int getErrorType()
        Determine the error type associated with this IndicationException.
        Returns:
        Returns the errorType.
      • getErrorValue

        public int getErrorValue()
        Determine the error value associated with this IndicationException.
        Returns:
        Returns the errorValue.
      • getIndication

        public Indication getIndication()
        Returns the Indication object that is associated with this exception, if one exists. There will only be an Indication object associated with an IndicationException if the exception was thrown by native code.
        Returns:
        an Indication object associated with this exception, or null if none exists.
      • getOperation

        public java.lang.String getOperation()
        Returns a String containing information about the operation which resulted in the exception being thrown.
        Returns:
        a String such as "Search", "Modify" etc.
      • getDN

        public DN getDN()
        Return the DN which was involved in the failing operation (if known)
        Returns:
        a DN - which may be null if none is known.
      • toString

        public java.lang.String toString()
        Returns a String representation of this exception, containing information about the failing operation, and DN if available.
        Overrides:
        toString in class java.lang.Throwable
        Returns:
        a user-friendly String representation of this exception.
      • getMessage

        public java.lang.String getMessage()
        Returns a String containing information about the operation which caused the exception, the DN if available, and details of the indication error type and value.
        Overrides:
        getMessage in class java.lang.Throwable
        Returns:
        a String containing details about the exception
      • getErrorTypeString

        public static java.lang.String getErrorTypeString​(int errorType)
        Return a user-friendly String representation of the errorType for this exception.
        Parameters:
        errorType - a numeric error type
        Returns:
        a String representation of errorType
        See Also:
        Indication.getErrorType()
      • getErrorValueString

        public static java.lang.String getErrorValueString​(int errorValue)
        Return a user-friendly String representation of the errorValue for this exception.
        Parameters:
        errorValue - a numeric error value
        Returns:
        a String representation of errorValue
        See Also:
        Indication.getErrorValue()