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

NashornException to expose thrown object

    Details

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

      Backports

        Description

        It would be very useful to retrieve the ScriptObjectMirror, Java Exception or any other throwable type.
        There is no way to retrieve this informationt without using internal API.

        ECMAException ecma = (ECMAException) nex;
        if (ecma.getThrown() instanceof ScriptObject) {
          ScriptObject so = (ScriptObject) ecma.getThrown();
          for (String m : so.getOwnKeys(false)) {
           // XXX
          }
        }

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  sundar Sundararajan Athijegannathan
                  Reporter:
                  jfdenise Jean-Francois Denise (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: