Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8014781

support Error.captureStackTrace

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8
    • None
    • core-libs
    • None
    • b98
    • generic
    • generic
    • Verified

    Description

      nashorn needs to support the api to capture a stack trace at a given point, as v8 does - see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi

      a sample program -

      function MyError() {
        Error.captureStackTrace(this, MyError);
      }

      var e = new MyError();
      print(e.stack);

      prints

      [object Object]
          at error.js:5:9

      with d8, whereas with nashorn it prints

      error.js:2 TypeError: Cannot call undefined

      Attachments

        Activity

          People

            sundar Sundararajan Athijegannathan
            akhil Akhil Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: