GenericSwiftError

public struct GenericSwiftError : THEOBaseError

An error that holds a Swift or Apple error.

Remark

When THEOplayer reports an error from Apple’s frameworks (for example AVFoundation, CoreMedia or URL loading), the cause of the THEOplayer error is a GenericSwiftError holding Apple’s original error, unchanged.
  • Declaration

    Swift

    public let name: String
  • The original error.

    Remark

    Cast it to NSError to read its domain, code and userInfo. Errors nested inside it are in underlyingErrors, or in userInfo[NSUnderlyingErrorKey]: let appleError = genericSwiftError.error as NSError let nestedError = appleError.underlyingErrors.first

    Declaration

    Swift

    public let error: Error
  • Declaration

    Swift

    public let stack: [String]?
  • Declaration

    Swift

    public var message: String { get }