org.elasticsearch.common.inject
Class ConfigurationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.elasticsearch.common.inject.ConfigurationException
All Implemented Interfaces:
Serializable

public final class ConfigurationException
extends RuntimeException

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
Author:
jessewilson@google.com (Jesse Wilson)
See Also:
Serialized Form

Constructor Summary
ConfigurationException(Iterable<Message> messages)
          Creates a ConfigurationException containing messages.
 
Method Summary
 Collection<Message> getErrorMessages()
          Returns messages for the errors that caused this exception.
 String getMessage()
           
<E> E
getPartialValue()
          Returns a value that was only partially computed due to this exception.
 ConfigurationException withPartialValue(Object partialValue)
          Returns a copy of this configuration exception with the specified partial value.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigurationException

public ConfigurationException(Iterable<Message> messages)
Creates a ConfigurationException containing messages.

Method Detail

withPartialValue

public ConfigurationException withPartialValue(Object partialValue)
Returns a copy of this configuration exception with the specified partial value.


getErrorMessages

public Collection<Message> 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

public String getMessage()
Overrides:
getMessage in class Throwable


Copyright © 2009-2012. All Rights Reserved.