/** * Get a string representing the script stack of this exception. * If optimization is enabled, this corresponds to all java stack elements * with a source name ending with ".js". * @return a script stack dump * @since 1.6R6 */ public String getScriptStackTrace() { return getScriptStackTrace(new FilenameFilter() { public boolean accept(File dir, String name) { return name.endsWith(".js"); } }); }
public void reportException(RhinoException ex) { if (ex instanceof WrappedException) { WrappedException we = (WrappedException)ex; we.printStackTrace(err); } else { String lineSeparator = SecurityUtilities.getSystemProperty("line.separator"); String msg = getExceptionMessage(ex) + lineSeparator + ex.getScriptStackTrace(); reportErrorMessage(msg, ex.sourceName(), ex.lineNumber(), ex.lineSource(), ex.columnNumber(), false); } }