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

WriteConcern CustomStringConvertible should return empty string on error

    XMLWordPrintable

    Details

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

      Description

      I noticed that ReadConcern and WriteConcern have inconsistent implementations for CustomStringConvertible. If ReadConcern encoding fails, an empty string is returned. If WriteConcern encoding fails, a preconditionFailure is emitted. The Document type is also consistent with ReadConcern in returning an empty string.

      While WriteConcern should never fail to encode as BSON, it should be consistent with the Document and ReadConcern implementations.

        Attachments

          Activity

            People

            Assignee:
            jmikola Jeremy Mikola
            Reporter:
            jmikola Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: