struct DecodingError.Context
Import | import Swift |
---|
Initializers
Creates a new context with the given path of coding keys and a description of what went wrong.
codingPath
: The path of coding keys taken to get to the
point of the failing decode call.
debugDescription
: A description of what went wrong, for
debugging purposes.
underlyingError
: The underlying error which caused this
error, if any.
Declaration
init(codingPath: [CodingKey], debugDescription: String, underlyingError: Error? = default)
Instance Variables
The path of coding keys taken to get to the point of the failing decode call.
Declaration
var codingPath: [CodingKey] { get }
A description of what went wrong, for debugging purposes.
Declaration
var debugDescription: String { get }
The underlying error which caused this error, if any.
Declaration
var underlyingError: Error? { get }
The context in which the error occurred.