decodingFailurePolicy
The action the coder should take when decoding fails.
Declaration
var decodingFailurePolicy: NSCoder.DecodingFailurePolicy { get }Discussion
A decode call can fail for the following reasons:
The keyed archive data is corrupt or missing.
A type mismatch occurs, such as expecting a class by calling decodeObject(of:forKey:) but encountering a numeric type instead. This also occurs when decodeInteger(forKey:) encounters a value encoded as floating-point, or vice versa.
A secure coding violation occurs. This happens when you attempt to decode an object that doesn’t conform to NSSecureCoding. This also happens when the encoded type doesn’t match any of the types passed to decodeObject(of:forKey:).