Contents

dataCorruptedError(in:debugDescription:)

Returns a new .dataCorrupted error using a constructed coding path and the given debug description.

Declaration

static func dataCorruptedError(in container: any UnkeyedDecodingContainer, debugDescription: String) -> DecodingError

Return Value

A new .dataCorrupted error with the given information.

Discussion

The coding path for the returned error is constructed by appending the given container’s current index to its coding path.

  • param container: The container in which the corrupted data was accessed.

  • param debugDescription: A description of the error to aid in debugging.