ModuleError

public enum ModuleError<SomeError> : ErrorEnum, ErrorWrapping where SomeError : Error

An error caused when trying to use a Module.

  • The module isn’t found when the operation is about to start, either because it’s disabled in the current settings or because it was never added to the TealiumConfig. No work was started, so retrying the operation after the module is enabled can succeed. An operation that already started fails instead with ModuleError.moduleShutdown(_:).

    module is the Module.moduleType of the missing module.

    Declaration

    Swift

    case moduleNotEnabled(_: String)
  • The module was found and had started an operation, but was shut down - either together with the Tealium instance or by a settings update that disabled it - before the operation could complete. Only operations that were already in progress fail with this error. An operation requested after a settings update disabled the module fails instead with ModuleError.moduleNotEnabled(_:), and one requested after the Tealium instance was shut down fails with ModuleError.tealiumError(_:) with .instanceShutdown.

    module is the Module.id of the shut down module.

    Declaration

    Swift

    case moduleShutdown(_: String)
  • The Tealium instance failed to initialize or was shut down before a Module operation could be started.

    Declaration

    Swift

    case tealiumError(_: TealiumError)
  • The module failed to perform a specific operation.

    Declaration

    Swift

    case underlyingError(_: SomeError)