Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40137

WriteCommandError's don't display the same as on v4.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: JavaScript
    • Labels:
      None

      Description

      On mongo-4.0:

      > throw new WriteCommandError({errmsg:"magic"})
      2019-03-14T16:29:48.373-0400 E QUERY    [js] WriteCommandError: magic :
      WriteCommandError({ "errmsg" : "magic" })
      WriteCommandError@src/mongo/shell/bulk_api.js:420:48
      @(shell):1:7
      > 
      

      and on master

      > throw new WriteCommandError({ok:0,errmsg:"magic"})
      2019-03-14T16:30:01.703-0400 E QUERY    [js] uncaught exception: WriteCommandError({ "ok" : 0, "errmsg" : "magic" }) :
      WriteCommandError({ "ok" : 0, "errmsg" : "magic" })
      WriteCommandError@src/mongo/shell/bulk_api.js:420:48
      @(shell):1:7
      > 
      

      The old "MozJSImplScope::_reportError" was previously passed the string "WriteCommandError: magic" which was somehow produced by spidermonkey itself, ass opposed to calling the actual toString on the object, which is what we have now.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: