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

NashornException to expose thrown object

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 8u20
    • core-libs
    • None
    • b02
    • generic
    • generic

        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
          }
        }

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

                Created:
                Updated:
                Resolved: