Class InjectionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
java.io.ObjectStreamException
java.io.InvalidObjectException
de.aristaflow.adept2.util.injection.InjectionException
- All Implemented Interfaces:
Serializable
The environment could not complete an object when deserialising: a
required
Injected field the driver cannot satisfy, a declaration the environment cannot honour at
all, an InjectionAware.afterInjection() that threw – or an InjectionAware
object met by a stream that refuses such objects instead of recording them.
Being an InvalidObjectException places these failures in the serialisation-problem
family under IOException: the refusal of plain streams surfaces through the existing
failure channel of readObject, while a catch that cares can still tell "the
environment could not complete this object" from ordinary stream trouble. The failure that
matters travels as the cause.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInjectionException(String message) Creates an exception with the designated description of the injection problem.InjectionException(String message, Throwable cause) Creates an exception with the designated description of the injection problem and the failure causing it, that is the provider lookup or theafterInjectionwhich threw. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InjectionException
Creates an exception with the designated description of the injection problem.- Parameters:
message- The description of the injection problem.
-
InjectionException
Creates an exception with the designated description of the injection problem and the failure causing it, that is the provider lookup or theafterInjectionwhich threw.- Parameters:
message- The description of the injection problem.cause- The failure causing this injection problem.
-