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‘s Value-type did not match with the stored one.

    Note

    When issue arised, you probably have defined two different Providers using the same key, but a different Value-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 Injectors.

    Declaration

    Swift

    case customError(Error)
  • Will be thrown if the dependency graph is recursive.

    Declaration

    Swift

    case cyclicDependency(Key)