I found this idea about Rhino extensions to error objects.

http://groups.google.com/group/mozilla.dev.tech.js-engine.rhino/msg/f38dde56deac2237

When I execute the following I see "nothing" no matter which "throw"
line is used.

    try {
      throw new java.lang.Exception('hi');
      // throw new Error('hi');
      // throw "asdf";
    }
    catch (e) {

      java.lang.System.out.println("vvvvvvvvvvvvvvvvvvvvvvvvv");

      if (e.rhinoException != null) {
        e.rhinoException.printStackTrace();
      }
      else if (e.javaException != null) {
        e.javaException.printStackTrace();
      }
      else {
        java.lang.System.out.println("nothing");
      }
      java.lang.System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^");

    }

Is there a special version of Rhino that is needed for this or do I
need to set some flag or something else to get the extensions?

Thanks,
Peter
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to