[SERVER-40137] WriteCommandError's don't display the same as on v4.0 Created: 14/Mar/19  Updated: 06/Dec/22  Resolved: 17/Dec/20

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Gabriel Russell (Inactive) Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: move-stm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Tooling & Methods
Operating System: ALL
Participants:

 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.



 Comments   
Comment by Robert Guo (Inactive) [ 17/Dec/20 ]

While this is unexpected behavior on 4.0, we don't expect to schedule a fix. Please feel free to re-open if you feel strongly about this issue.

Generated at Thu Feb 08 04:54:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.