Back to Alamofire

Error

docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Error.html

5.12.0571 B
Original Source

Error

extension Error

`

                asAFError
                `

Returns the instance cast as an AFError.

Declaration

Swift

public var asAFError: AFError? { get }

`

                asAFError(orFailWith:file:line:)
                `

Returns the instance cast as an AFError. If casting fails, a fatalError with the specified message is thrown.

Declaration

Swift

public func asAFError(orFailWith message: @autoclosure () -> String, file: StaticString = #fileID, line: UInt = #line) -> AFError