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

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

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: JavaScript
    • Server Tooling & Methods
    • ALL

      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.

            Assignee:
            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: