Class ConfigurationException

All Implemented Interfaces:
Serializable

public class ConfigurationException extends UltiToolsException
Exception thrown when configuration operations fail.

This includes configuration loading, parsing, saving, and validation errors.

Since:
6.2.0
Author:
wisdomme
See Also:
  • Constructor Details

    • ConfigurationException

      public ConfigurationException(String message)
      Creates a new configuration exception with the given message.
      Parameters:
      message - the error message
    • ConfigurationException

      public ConfigurationException(ErrorCode errorCode, String message)
      Creates a new configuration exception with a specific error code.
      Parameters:
      errorCode - the error code
      message - the error message
    • ConfigurationException

      public ConfigurationException(String message, Throwable cause)
      Creates a new configuration exception with message and cause.
      Parameters:
      message - the error message
      cause - the underlying cause
    • ConfigurationException

      public ConfigurationException(ErrorCode errorCode, String message, Throwable cause)
      Creates a new configuration exception with error code, message, and cause.
      Parameters:
      errorCode - the error code
      message - the error message
      cause - the underlying cause
  • Method Details

    • loadFailed

      public static ConfigurationException loadFailed(String configPath, Throwable cause)
      Creates an exception for configuration load failures.
      Parameters:
      configPath - the path to the configuration file
      cause - the underlying cause
      Returns:
      a new ConfigurationException
    • saveFailed

      public static ConfigurationException saveFailed(String configPath, Throwable cause)
      Creates an exception for configuration save failures.
      Parameters:
      configPath - the path to the configuration file
      cause - the underlying cause
      Returns:
      a new ConfigurationException
    • parseFailed

      public static ConfigurationException parseFailed(String configPath, Throwable cause)
      Creates an exception for configuration parse failures.
      Parameters:
      configPath - the path to the configuration file
      cause - the underlying cause
      Returns:
      a new ConfigurationException
    • validationFailed

      public static ConfigurationException validationFailed(String fieldName, String validationRule)
      Creates an exception for configuration validation failures.
      Parameters:
      fieldName - the name of the invalid field
      validationRule - the validation rule that was violated
      Returns:
      a new ConfigurationException