RVS_Fault
public struct RVS_Fault : Error
This is a struct that describes an error/issue.
The enclosed enums are the standard ONVIF error codes and subcodes. They use ONVIF TitleCase, as opposed to the standard camelCase, in order to help correlate.
-
This is any HTTP code that may have accompanied the error. Default is 0.
Declaration
Swift
public let httpCode: Int
-
This is a partially-parsed ONVIF response. If this is specified, the the fault code will be dynamically determined.
Declaration
Swift
public let responseDictionary: [String : Any]!
-
This is any ONVIF fault. The dictionary is parsed. READ-ONLY.
Declaration
Swift
public var fault: FaultCode { get }
-
This returns any reason or details text (may be empty).
Declaration
Swift
public var reason: String { get }
-
This returns the main fault localized description.
Declaration
Swift
public var localizedDescription: String { get }
-
This initializer will fail if there is no actual fault in the data.
Both parameters are optional.
Declaration
Parameters
faultCode
This is a prearranged fault. If this is provided, then the next two are ignored.
faultDictionary
This is the Dictionary that has been partially parsed, but is “top-level” (above “Body”). Default is nil.
httpCode
This is any HTTP code that accompanies the fault. Default is 0 (undefined).
Return Value
nil, if there is no fault.