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

Add context to JavaScript errors reported by v8

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.0-rc1
    • Affects Version/s: None
    • Component/s: JavaScript
    • ALL

      Currently, JS error messages are very confusing for users; e.g.:

      Tue Feb 19 11:40:29.554 [conn3] JavaScript execution failed: SyntaxError: Unexpected identifier _funcs9:1
      

      This is partially because we specify an arbitrary variable name (e.g. funcs9) as the script context/filename in V8Scope::_createFunction(). This should either be removed, or toSTLString(v8::TryCatch*) should access the code from the scope's map and parse the start/end position to provide the context reported by v8.

            Assignee:
            benjamin.becker Ben Becker
            Reporter:
            benjamin.becker Ben Becker
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: