[SERVER-852] Mongo console will re-print a server error if a client JS parse error happens Created: 30/Mar/10  Updated: 12/Jul/16  Resolved: 30/Mar/10

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

Type: Bug Priority: Major - P3
Reporter: Matt Mastracci Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386
mongodb-osx-x86_64-1.4.0


Participants:

 Description   

If you execute a find() that fails on the server, then a statement with a JS parsing error on the client, the shell prints the previous server error a second time:

> db.foo.find({$where:"x"})
error: {
"$err" : "error on invocation of $where function:
JS Error: ReferenceError: x is not defined nofile_a:0"
}

> db.foo.find({$where})
Tue Mar 30 11:34:04 JS Error: SyntaxError: missing : after property id (shell):0
error on invocation of $where function:
JS Error: ReferenceError: x is not defined nofile_a:0



 Comments   
Comment by Eliot Horowitz (Inactive) [ 26/Apr/10 ]

in a release

Comment by auto [ 30/Mar/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: don't print out old getLastError on client error SERVER-852
http://github.com/mongodb/mongo/commit/67d7d7936b0b961791db2cb19470dceb64de69ef

Generated at Thu Feb 08 02:55:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.