Class NXCException

    • Field Detail

      • errorCode

        protected int errorCode
        Application-specific error code
      • additionalInfo

        protected String additionalInfo
        Additional information about this error
    • Constructor Detail

      • NXCException

        public NXCException​(int errorCode)
        Create new NXC exception.
        Parameters:
        errorCode - Error code
      • NXCException

        public NXCException​(int errorCode,
                            String additionalInfo)
        Create new NXC exception with additional information.
        Parameters:
        errorCode - Error code
        additionalInfo - Additional info
      • NXCException

        public NXCException​(int errorCode,
                            Throwable cause)
        Create new NXC exception with root cause reference.
        Parameters:
        errorCode - Error code
        cause - root cause exception
    • Method Detail

      • getErrorMessage

        protected String getErrorMessage​(int code,
                                         String lang)
        Get error message text for given error code. Must not return null.
        Parameters:
        code - error code
        lang - language code
        Returns:
        error message for given code
      • getErrorCode

        public int getErrorCode()
        Get exception's error code.
        Returns:
        the errorCode
      • getAdditionalInfo

        public String getAdditionalInfo()
        Get additional information associated with exception (for example, NXSL error message)
        Returns:
        additional information associated with exception