Package org.elasticsearch.common.inject
Class ConfigurationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.elasticsearch.common.inject.ConfigurationException
- All Implemented Interfaces:
Serializable
Thrown when a programming error such as a misplaced annotation, illegal binding, or unsupported
scope is found. Clients should catch this exception, log it, and stop execution.
- Since:
- 2.0
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorDescriptionConfigurationException(Iterable<Message> messages)
Creates a ConfigurationException containingmessages
. -
Method Summary
Modifier and TypeMethodDescriptionReturns messages for the errors that caused this exception.<E> E
Returns a value that was only partially computed due to this exception.withPartialValue(Object partialValue)
Returns a copy of this configuration exception with the specified partial value.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ConfigurationException
Creates a ConfigurationException containingmessages
.
-
-
Method Details
-
withPartialValue
Returns a copy of this configuration exception with the specified partial value. -
getErrorMessages
Returns messages for the errors that caused this exception. -
getPartialValue
public <E> E getPartialValue()Returns a value that was only partially computed due to this exception. The caller can use this while collecting additional configuration problems.- Returns:
- the partial value, or
null
if none was set. The type of the partial value is specified by the throwing method.
-
getMessage
- Overrides:
getMessage
in classThrowable
-