[SERVER-20573] Javascript syntax errors show no context Created: 23/Sep/15  Updated: 08/Jan/24  Resolved: 24/Nov/15

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

Type: Bug Priority: Critical - P2
Reporter: Eric Milkie Assignee: Mira Carey
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

Taking the following test file "test.js":

var barf = syntax error;

With Spidermonkey:

/data/1/mongo: ./mongo --nodb jstests/replsets/test.js 
MongoDB shell version: 3.1.9-pre-
2015-09-23T09:23:14.379-0400 E QUERY    [thread1] SyntaxError: missing ; before statement :
 
failed to load: jstests/replsets/test.js

With V8 in 3.0:

/data/m/30/mongo: ./mongo --nodb /data/1/mongo/jstests/replsets/test.js 
MongoDB shell version: 3.0.4-pre-
2015-09-23T09:23:33.112-0400 E QUERY    SyntaxError: Unexpected identifier at /data/1/mongo/jstests/replsets/test.js:2
failed to load: /data/1/mongo/jstests/replsets/test.js

This makes it really hard to edit large js test files, for obvious reasons.



 Comments   
Comment by Eric Milkie [ 24/Nov/15 ]

context is now visible in Spidermonkey, as of 3.2.0rc3

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