MongoQueryException should provide response document that caused it

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 1.2
    • Affects Version/s: 1.2
    • Component/s: None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, MongoQueryException only stores the message string. For our internal error handling mechanism it would be much better if it provided access to the response document.
      MongoCommandException, for example, has the ability to store CommandResult, and having something like QueryResult, containing the response document would be very good.
      I think this will be a good addition for everyone to use, at least to be able to do detailed logging.

      Currently, because there is no access to the response document we have to do error testing in the following way (yes, this code smells, but there's no choice right now) :
      catch (MongoQueryException exception)

      { if (exception.Message.Contains("\"code\" : 13435 }

      "))

      { ... }

      }

            Assignee:
            Robert Stam
            Reporter:
            Aristarkh Zagorodnikov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: