Skip to content

Commit

Permalink
Add missing error descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
christophhagen committed Jul 18, 2022
1 parent 8958796 commit ca70462
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/BinaryCodable/BinaryDecodingError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
11 changes: 11 additions & 0 deletions Sources/BinaryCodable/BinaryEncodingError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit ca70462

Please sign in to comment.