Class ConfigurationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.ultikits.ultitools.exceptions.UltiToolsException
com.ultikits.ultitools.exceptions.ConfigurationException
- All Implemented Interfaces:
Serializable
Exception thrown when configuration operations fail.
This includes configuration loading, parsing, saving, and validation errors.
- Since:
- 6.2.0
- Author:
- wisdomme
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationException(ErrorCode errorCode, String message) Creates a new configuration exception with a specific error code.ConfigurationException(ErrorCode errorCode, String message, Throwable cause) Creates a new configuration exception with error code, message, and cause.ConfigurationException(String message) Creates a new configuration exception with the given message.ConfigurationException(String message, Throwable cause) Creates a new configuration exception with message and cause. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigurationExceptionloadFailed(String configPath, Throwable cause) Creates an exception for configuration load failures.static ConfigurationExceptionparseFailed(String configPath, Throwable cause) Creates an exception for configuration parse failures.static ConfigurationExceptionsaveFailed(String configPath, Throwable cause) Creates an exception for configuration save failures.static ConfigurationExceptionvalidationFailed(String fieldName, String validationRule) Creates an exception for configuration validation failures.Methods inherited from class com.ultikits.ultitools.exceptions.UltiToolsException
getErrorCode, getFormattedMessage, toStringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ConfigurationException
Creates a new configuration exception with the given message.- Parameters:
message- the error message
-
ConfigurationException
Creates a new configuration exception with a specific error code.- Parameters:
errorCode- the error codemessage- the error message
-
ConfigurationException
Creates a new configuration exception with message and cause.- Parameters:
message- the error messagecause- the underlying cause
-
ConfigurationException
Creates a new configuration exception with error code, message, and cause.- Parameters:
errorCode- the error codemessage- the error messagecause- the underlying cause
-
-
Method Details
-
loadFailed
Creates an exception for configuration load failures.- Parameters:
configPath- the path to the configuration filecause- the underlying cause- Returns:
- a new ConfigurationException
-
saveFailed
Creates an exception for configuration save failures.- Parameters:
configPath- the path to the configuration filecause- the underlying cause- Returns:
- a new ConfigurationException
-
parseFailed
Creates an exception for configuration parse failures.- Parameters:
configPath- the path to the configuration filecause- the underlying cause- Returns:
- a new ConfigurationException
-
validationFailed
Creates an exception for configuration validation failures.- Parameters:
fieldName- the name of the invalid fieldvalidationRule- the validation rule that was violated- Returns:
- a new ConfigurationException
-