Instance Property

error

An error in the top-level encode.

Declaration

var error: Error? { get }

Discussion

The meaning of this property depends on the setting of the decodingFailurePolicy property. For NSCoder.DecodingFailurePolicy.raiseException, this property is always nil. For NSCoder.DecodingFailurePolicy.setErrorAndReturn, a non-nil value represents the first error encountered while decoding the archive.

See Also

Managing Decode Errors

func failWithError(Error)

Signals to this coder that the decode operation has failed.