< prev index next >

src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Debug.java

Print this page

        

*** 24,33 **** --- 24,35 ---- */ package jdk.nashorn.internal.runtime; import static jdk.nashorn.internal.parser.TokenType.EOF; + + import jdk.nashorn.api.scripting.NashornException; import jdk.nashorn.internal.parser.Lexer; import jdk.nashorn.internal.parser.Token; import jdk.nashorn.internal.parser.TokenStream; import jdk.nashorn.internal.parser.TokenType;
*** 61,70 **** --- 63,81 ---- public static String firstJSFrame() { return firstJSFrame(new Throwable()); } /** + * Return a formatted script stack trace string with frames information separated by '\n'. + * This is a shortcut for {@code NashornException.getScriptStackString(new Throwable())}. + * @return formatted stack trace string + */ + public static String scriptStack() { + return NashornException.getScriptStackString(new Throwable()); + } + + /** * Return the system identity hashcode for an object as a human readable * string * * @param x object * @return system identity hashcode as string
< prev index next >