Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-19612

JSThread exception messages are not printed when using SpiderMonkey

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.7
    • Affects Version/s: 3.1.6
    • Component/s: JavaScript, Shell
    • Fully Compatible
    • ALL
    • Hide
      load('jstests/libs/parallelTester.js');
      
      var fn = function() {throw new Error('print me');};
      var t = new ScopedThread(fn);
      t.start();
      t.join();
      
      Show
      load('jstests/libs/parallelTester.js'); var fn = function() {throw new Error('print me');}; var t = new ScopedThread(fn); t.start(); t.join();
    • Platform 7 08/10/15

      The included JS test prints out this exception info in 3.1.5 (notice 'print me' in the output):

      MongoDB shell version: 3.1.5
      connecting to: test
      connecting to: test
      2015-07-27T16:41:53.861-0400 I -        [thread1] js thread raised js exception: Error: print me
          at ____MongoToV8_newFunction_temp (<anonymous>:1:53)
      

      Here's the output from master (notice that 'print me' is missing):

      MongoDB shell version: 3.1.7-pre-
      connecting to: test
      connecting to: test
      2015-07-27T16:42:08.329-0400 I QUERY    [thread2] js thread raised js exception: JSInterpreterFailure Unknown callThread failure
      2015-07-27T16:42:08.336-0400 I QUERY    [thread2] js thread threw c++ exception: JSInterpreterFailure Unknown callThread failure
      

            Assignee:
            mira.carey@mongodb.com Mira Carey
            Reporter:
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: