diff --git a/Sources/BinaryCodable/BinaryDecodingError.swift b/Sources/BinaryCodable/BinaryDecodingError.swift index 61ba301..67e9618 100644 --- a/Sources/BinaryCodable/BinaryDecodingError.swift +++ b/Sources/BinaryCodable/BinaryDecodingError.swift @@ -74,6 +74,8 @@ public enum BinaryDecodingError: Error { /** An unexpected and unknown error occured during decoding. + + As the associated value, this case contains the original error. */ case unknownError(Error) } diff --git a/Sources/BinaryCodable/BinaryEncodingError.swift b/Sources/BinaryCodable/BinaryEncodingError.swift index 912f11e..2061cb2 100644 --- a/Sources/BinaryCodable/BinaryEncodingError.swift +++ b/Sources/BinaryCodable/BinaryEncodingError.swift @@ -29,8 +29,19 @@ public enum BinaryEncodingError: Error { */ case multipleValuesInSingleValueContainer + /** + An indication that an encoder or its containers could not encode the given value. + + As associated values, this case contains the attempted value and context for debugging. + - Note: This error case mirrors `EncodingError.invalidValue()` + */ case invalidValue(Any, EncodingError.Context) + /** + An unexpected and unknown error occured during encoding. + + As the associated value, this case contains the original error. + */ case unknownError(Error) }