[SERVER-8926] Shell displays "JavaScript execution failed: " before all JavaScript errors, adds "L" before line number Created: 09/Mar/13  Updated: 11/Jul/16  Resolved: 30/May/13

Status: Closed
Project: Core Server
Component/s: JavaScript, Shell
Affects Version/s: 2.4.0-rc2
Fix Version/s: 2.4.6, 2.5.1

Type: Bug Priority: Major - P3
Reporter: Tad Marshall Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-8553 Prevent use of v8 state after error c... Closed
is related to SERVER-8292 Make JavaScript error reporting more ... Closed
is related to SERVER-8618 Add context to JavaScript errors repo... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

For version 2.4.0-rc0, we had mimicked the error reporting from version 2.2.

MongoDB shell version: 2.2.4-pre-
> var v = foo.bar.baz;
Sat Mar 09 14:16:35 ReferenceError: foo is not defined (shell):1

MongoDB shell version: 2.4.0-rc0
> interpreterVersion()
V8 3.12.19
> var v = foo.bar.baz;
Sat Mar 09 14:51:40.597 ReferenceError: foo is not defined (shell):1

In version 2.4.0-rc2, we are getting extra text that seems unnecessary:

MongoDB shell version: 2.4.0-rc2
> interpreterVersion()
V8 3.12.19
> var v = foo.bar.baz;
Sat Mar 09 15:02:25.723 JavaScript execution failed: ReferenceError: foo is not defined

We also lost the "(shell):1" text, but that might be consider a "feature".

It would be nice to get rid of the "JavaScript execution failed: " text.

Also, commit https://github.com/mongodb/mongo/commit/f11d2b67e2f185a0934d76cca21361b0679e5301 added an "L" before the line number, which does not match prior error logging.



 Comments   
Comment by auto [ 29/Jul/13 ]

Author:

{u'username': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-8926 Remove extra error text and 'L' line number prefix
Branch: v2.4
https://github.com/mongodb/mongo/commit/ec902210eb2a7e9c5e4818f8c39328da493a5df4

Comment by auto [ 30/May/13 ]

Author:

{u'username': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-8926 Remove extra error text and 'L' line number prefix
Branch: master
https://github.com/mongodb/mongo/commit/3b1257a5224d1e9df71ee1b4631ca32f2cf438f2

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