InjectionError
public enum InjectionError<Key> : Error, Equatable where Key : Hashable
Errors, that may occur while resolving from a Provider
.
-
There has been no value provided with the
ProvidableKey
.Declaration
Swift
case keyNotProvided(Key)
-
The given
Provider
‘sValue
-type did not match with the stored one.Note
When issue arised, you probably have defined two differentProvider
s using the samekey
, but a differentValue
-Type.Declaration
Swift
case nonMatchingType(provided: Any, expected: Providable.Type)
-
Any specific Error that may occur in your custom implementations. Will not be thrown by built-in
Injector
s.Declaration
Swift
case customError(Error)
-
Will be thrown if the dependency graph is recursive.
Declaration
Swift
case cyclicDependency(Key)