use of net.sourceforge.htmlunit.corejs.javascript.RhinoException in project htmlunit by HtmlUnit.
the class Console method trace.
/**
* This method performs logging to the console at {@code trace} level.
* @param cx the JavaScript context
* @param thisObj the scriptable
* @param args the arguments passed into the method
* @param funObj the function
*/
@JsxFunction
public static void trace(final Context cx, final Scriptable thisObj, final Object[] args, final Function funObj) {
final RhinoException e = ScriptRuntime.throwError(cx, funObj, null);
final WebConsole webConsole = toWebConsole(thisObj);
final Formatter oldFormatter = webConsole.getFormatter();
webConsole.setFormatter(FORMATTER_);
webConsole.info(e.getScriptStackTrace());
webConsole.setFormatter(oldFormatter);
}
Aggregations