src/jdk/nashorn/api/scripting/NashornException.java

Print this page

        

*** 170,185 **** */ public static String getScriptStackString(final Throwable exception) { final StringBuilder buf = new StringBuilder(); final StackTraceElement[] frames = getScriptFrames((Throwable)exception); for (final StackTraceElement st : frames) { buf.append(st.getMethodName()); ! buf.append(" @ "); buf.append(st.getFileName()); buf.append(':'); buf.append(st.getLineNumber()); ! buf.append('\n'); } final int len = buf.length(); // remove trailing '\n' if (len > 0) { assert buf.charAt(len - 1) == '\n'; --- 170,186 ---- */ public static String getScriptStackString(final Throwable exception) { final StringBuilder buf = new StringBuilder(); final StackTraceElement[] frames = getScriptFrames((Throwable)exception); for (final StackTraceElement st : frames) { + buf.append("\tat "); buf.append(st.getMethodName()); ! buf.append(" ("); buf.append(st.getFileName()); buf.append(':'); buf.append(st.getLineNumber()); ! buf.append(")\n"); } final int len = buf.length(); // remove trailing '\n' if (len > 0) { assert buf.charAt(len - 1) == '\n';