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

NashornException to expose thrown object

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 9
    • 8u20
    • core-libs
    • None
    • b02
    • generic
    • 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

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

                Dates

                  Created:
                  Updated:
                  Resolved: