Class CriticalErrorsImpl

    • Constructor Detail

      • CriticalErrorsImpl

        public CriticalErrorsImpl​(@NotNull
                                  ServerPaths serverPaths)
    • Method Detail

      • putError

        public void putError​(@NotNull
                             String key,
                             @NotNull
                             String message)
        Description copied from interface: CriticalErrors
        Adds a new error and logs it to a log gile with warning log level
        Specified by:
        putError in interface CriticalErrors
        Parameters:
        key - error key
        message - error message
      • putError

        public void putError​(@NotNull
                             String key,
                             @NotNull
                             String message,
                             boolean logMessage)
        Description copied from interface: CriticalErrors
        Adds a new error
        Specified by:
        putError in interface CriticalErrors
        Parameters:
        key - error key
        message - error message
        logMessage - if true then the log will be logged to a log file with warning log level
      • containsError

        public boolean containsError​(@NotNull
                                     String key)
        Description copied from interface: CriticalErrors
        Returns true if an error with specified key exists
        Specified by:
        containsError in interface CriticalErrors
        Parameters:
        key - key of the error
        Returns:
        true if error exists
      • clearError

        public void clearError​(@NotNull
                               String key)
        Description copied from interface: CriticalErrors
        Removes error with specified key
        Specified by:
        clearError in interface CriticalErrors
        Parameters:
        key - key of the error
      • hasErrors

        public boolean hasErrors()
        Description copied from interface: CriticalErrors
        Returns true if and only if there is any error.
        Specified by:
        hasErrors in interface CriticalErrors
      • getError

        @Nullable
        public String getError​(@NotNull
                               String key)
        Specified by:
        getError in interface CriticalErrors
        Parameters:
        key - particular key to look for
        Returns:
        error message for specified key