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

__stack__ becomes visible in Error properties

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b17
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        the __stack__ property becomes visible after accessing Error.stack -

        var err = new Error("the-message");
        print('err.json1: '+JSON.stringify(err));
        print('err: '+err);
        print('err.message: '+err.message);
        print('err.stack: '+err.stack);
        print('err.json2: '+JSON.stringify(err));

        this prints -

        err.json1: {}
        err: Error: the-message
        err.message: the-message
        err.stack: Error: the-message
        at <program> (error.js:1)
        err.json2: {"__stack__":"Error: the-message\n\tat <program> (error.js:1)"}

        node/v8 prints -

        err.json1: {}
        err: Error: the-message
        err.message: the-message
        err.stack: Error: the-message
            ...
            at node.js:902:3
        err.json2: {}

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: