public final class

ConfigurationException

extends RuntimeException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ com.google.inject.ConfigurationException

Class Overview

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.

Summary

Public Constructors
ConfigurationException(Iterable<Message> messages)
Creates a ConfigurationException containing messages.
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public ConfigurationException (Iterable<Message> messages)

Creates a ConfigurationException containing messages.

Public Methods

public Collection<Message> getErrorMessages ()

Returns messages for the errors that caused this exception.

public String getMessage ()

Since: API Level

public 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.

public ConfigurationException withPartialValue (Object partialValue)

Returns a copy of this configuration exception with the specified partial value.