Static Methodswift 6.0.1Swift
dataCorruptedError(in:debugDescription:)
Returns a new .dataCorrupted
error using a constructed coding path and the given debug description.
static func dataCorruptedError(in container: any SingleValueDecodingContainer, debugDescription: String) -> DecodingError
Returns
A new .dataCorrupted
error with the given information.
The coding path for the returned error is the given container’s coding path.
param container: The container in which the corrupted data was accessed.
param debugDescription: A description of the error to aid in debugging.
Other members in extension
Types
struct Context
The context in which the error occurred.
Type members
static func dataCorruptedError<C>(forKey: C.Key, in: C, debugDescription: String
) -> DecodingError Returns a new
.dataCorrupted
error using a constructed coding path and the given debug description.static func dataCorruptedError(in: any UnkeyedDecodingContainer, debugDescription: String
) -> DecodingError Returns a new
.dataCorrupted
error using a constructed coding path and the given debug description.