Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-506

Use more descriptive messages in WriteExceptions

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.1.3
    • Affects Version/s: 1.0.0
    • Component/s: None
    • None

      Currently, write exceptions thrown due to the write command's response indicating write concern or write errors will use "BulkWrite error" as their message. This should be improved to at least suggest that the user examine the attached WriteResult for more information. Alternatively, we can attempt to merge errors into a string or indicate if the cause was one or a mix of write and write concern errors.

      Suggested format:

      message = "BulkWrite error"
      foreach ( writeError ) { message .= " :: " .writeError.message };
      foreach ( writeConcernError ) { message .= " :: " .writeError.message };
      

            Assignee:
            derick Derick Rethans
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: