Class BaseCheckedException

    • Constructor Detail

      • BaseCheckedException

        public BaseCheckedException()
        Constructs a new checked exception
      • BaseCheckedException

        public BaseCheckedException​(String errorMessage)
        Constructs a new checked exception with errorMessage
        Parameters:
        errorMessage - the detail message.
      • BaseCheckedException

        public BaseCheckedException​(String errorCode,
                                    String errorMessage)
        Constructs a new checked exception with the specified detail message and error code.
        Parameters:
        errorCode - the error code
        errorMessage - the detail message.
      • BaseCheckedException

        public BaseCheckedException​(String errorCode,
                                    String errorMessage,
                                    Throwable rootCause)
        Constructs a new checked exception with the specified detail message and error code and specified cause.
        Parameters:
        errorCode - the error code
        errorMessage - the detail message.
        rootCause - the specified cause
    • Method Detail

      • addInfo

        public BaseCheckedException addInfo​(String errorCode,
                                            String errorText)
        This method add error code and error message.
        Parameters:
        errorCode - the error code
        errorText - the detail message.
        Returns:
        the current instance of BaseCheckedException
      • getCodes

        public List<String> getCodes()
        Returns the list of exception codes.
        Returns:
        list of exception codes
      • getErrorTexts

        public List<String> getErrorTexts()
        Returns the list of exception messages.
        Returns:
        list of exception messages
      • getErrorCode

        public String getErrorCode()
        Return the last error code.
        Returns:
        the last error code
      • getErrorText

        public String getErrorText()
        Return the last exception message.
        Returns:
        the last exception message