-
Type: Bug
-
Resolution: Won't Fix
-
Priority: 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.