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

Convert bsonEncodeError, bsonDecodeError, typeError to new error types

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 0.1.0
    • None
    • 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

            patrick.freed@mongodb.com Patrick Freed
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: