getLastErrorDetailed does not report an error

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Critical - P2
    • None
    • Affects Version/s: 1.8.1
    • Component/s: Internal Client
    • None
    • Environment:
      linux, ubuntu lucyd.
    • ALL
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      Request:
      { "findAndModify" : "points", "query" :

      { "_id" : "b91bb726-fe07-5c37-92e7-56077fbc2b36", "version" : 0 }

      , "update" : { "$set" :

      { < SOME FIELDS HERE > }

      }, "new" : true, "upsert" : false }
      Result:

      { "errmsg" : "No matching object found", "ok" : 0 }

      As far as mongo C++ driver does not throw exceptions and every command has it's own way to report errors I prefer to use getLastErrorDetailed() where possible. But unfortunately it reports that there was no error:

      { "n" : 0, "connectionId" : 88, "err" : null, "ok" : 1 }

      Please, make C++ driver to report error is only one way. It would especially good if it would be exceptions. I'm really frustrated to find out that one part of my application has crashed with very strange error because there is another one way to report error which my magic checker does not know about.

            Assignee:
            Unassigned
            Reporter:
            Alexey Guseynov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: