use of com.gargoylesoftware.htmlunit.WebConsole.Formatter in project htmlunit by HtmlUnit.
the class Console method error.
/**
* This method performs logging to the console at {@code error} 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 error(final Context cx, final Scriptable thisObj, final Object[] args, final Function funObj) {
final WebConsole webConsole = toWebConsole(thisObj);
final Formatter oldFormatter = webConsole.getFormatter();
webConsole.setFormatter(FORMATTER_);
webConsole.error(args);
webConsole.setFormatter(oldFormatter);
}
Aggregations