Uploaded image for project: 'Swift Driver'
  1. Swift Driver
  2. SWIFT-304

Convert bsonEncodeError, bsonDecodeError, typeError to new error types

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.1.0
    • Component/s: None
    • Labels:
      None

      Description

      In our encoders and decoders, we currently throw many different types of errors, some of which are redundant or incorrect.

      We should update them to throw encodingError, decodingError, logicErrors, internalErrors, or invalidArgumentErrors as necessary.

      Also, when encoding/decoding directly to/from a document without the use of BSONEncoder / BSONDecoder (i.e. through BSONValue conformance methods ), we should be throwing appropriate errors. In particular, we should be throwing .logicError s when the user attempts to retrieve a value from a DocumentIterator that doesn't match the current type of the iterator.

        Attachments

          Activity

            People

            • Assignee:
              patrick.freed Patrick Freed
              Reporter:
              patrick.freed Patrick Freed
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: