public final class InternalProvisionException extends Exception
This is the internal dual of ProvisionException
, similar to the relationship between
ConfigurationException
and ErrorsException
. This is useful for
several reasons:
This exception will be thrown when errors are encountered during provisioning, ErrorsException
will continue to be used for errors that are encountered during provisioning and both make use of
the Message
as the core model.
NOTE: this object stores a list of messages but in the most common case the cardinality will
be 1. The only time that multiple errors might be reported via this mechanism is when errorInUserCode(java.lang.Throwable, java.lang.String, java.lang.Object...)
is called with an exception that holds multiple errors (like
ProvisionException).
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static InternalProvisionException circularDependenciesDisabled(Class<?> expectedType)
public static InternalProvisionException cannotProxyClass(Class<?> expectedType)
public static InternalProvisionException create(String format, Object... arguments)
public static InternalProvisionException errorInUserCode(Throwable cause, String messageFormat, Object... arguments)
public static InternalProvisionException subtypeNotProvided(Class<? extends javax.inject.Provider<?>> providerType, Class<?> type)
public static InternalProvisionException errorInProvider(Throwable cause)
public static InternalProvisionException errorInjectingMethod(Throwable cause)
public static InternalProvisionException errorInjectingConstructor(Throwable cause)
public static InternalProvisionException errorInUserInjector(MembersInjector<?> listener, TypeLiteral<?> type, RuntimeException cause)
public static InternalProvisionException jitDisabled(Key<?> key)
public static InternalProvisionException errorNotifyingInjectionListener(InjectionListener<?> listener, TypeLiteral<?> type, RuntimeException cause)
public ProvisionException toProvisionException()
Copyright © 2006–2020 Google, Inc.. All rights reserved.