Package jdk.nashorn.internal.runtime

Examples of jdk.nashorn.internal.runtime.ScriptObject


      String filename = null;
      int line = -1;
      int column = -1;
      List<String> extractList = new ArrayList<String>();
      if (thrown instanceof ScriptObject) {
        ScriptObject so = (ScriptObject) e.getThrown();
        type = so.get("type").toString() + " Error";
        message = so.get("message").toString();
        filename = "";
        if (so.has("filename")) {
          filename = so.get("filename").toString();
        }
        if (so.has("line")) {
          line = ((Long) so.get("line")).intValue();
        }
        if (so.has("column")) {
          column = ((Double) so.get("column")).intValue();
        }
        if (so.has("extract")) {
          NativeArray extract = (NativeArray) so.get("extract");
          for (int i = 0; i < extract.size(); i++) {
            if (extract.get(i) instanceof String) {
              extractList.add(((String) extract.get(i))
                  .replace("\t", " "));
            }
View Full Code Here

TOP

Related Classes of jdk.nashorn.internal.runtime.ScriptObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.