Package com.google.inject
Class CreationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.google.inject.CreationException
-
- All Implemented Interfaces:
Serializable
public class CreationException extends RuntimeException
Thrown when errors occur while creating aInjector
. Includes a list of encountered errors. Clients should catch this exception, log it, and stop execution.- Author:
- crazybob@google.com (Bob Lee)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CreationException(Collection<Message> messages)
Creates a CreationException containingmessages
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Message>
getErrorMessages()
Returns messages for the errors that caused this exception.String
getMessage()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
CreationException
public CreationException(Collection<Message> messages)
Creates a CreationException containingmessages
.
-
-
Method Detail
-
getErrorMessages
public Collection<Message> getErrorMessages()
Returns messages for the errors that caused this exception.
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
-