Class ConfigException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.arthurhoch.kissconfig.exceptions.ConfigException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ConfigDuplicateKeyException,ConfigInterpolationException,ConfigInvalidProfileException,ConfigLoadException,ConfigMappingException,ConfigParseException
Base runtime exception for all KissConfig failures.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConfigException(String message) Creates an exception with a message.ConfigException(String message, Throwable cause) Creates an exception with a message and cause.ConfigException(String message, Throwable cause, String key, String source, String targetType, String safeValue) Creates an exception with diagnostic metadata. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ConfigException
Creates an exception with a message.- Parameters:
message- error message
-
ConfigException
Creates an exception with a message and cause.- Parameters:
message- error messagecause- cause
-
ConfigException
public ConfigException(String message, Throwable cause, String key, String source, String targetType, String safeValue) Creates an exception with diagnostic metadata.- Parameters:
message- error messagecause- causekey- related keysource- source name or pathtargetType- target typesafeValue- value safe for display
-
-
Method Details
-
key
Returns the related key when available.- Returns:
- optional key
-
source
Returns the related source when available.- Returns:
- optional source
-
targetType
Returns the target type when available.- Returns:
- optional target type
-
safeValue
Returns the safe display value when available.- Returns:
- optional safe value
-