Class DefaultJavaScriptErrorListener
java.lang.Object
org.htmlunit.javascript.DefaultJavaScriptErrorListener
- All Implemented Interfaces:
Serializable, JavaScriptErrorListener
public class DefaultJavaScriptErrorListener
extends Object
implements JavaScriptErrorListener, Serializable
Default implementation of
JavaScriptErrorListener that does
default logging.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidloadScriptError(HtmlPage page, URL scriptUrl, Exception exception) Informs about an exception during load of a javascript file refereed from a page.voidmalformedScriptURL(HtmlPage page, String url, MalformedURLException malformedURLException) Informs about a malformed url referencing to to script.voidscriptException(HtmlPage page, ScriptException scriptException) Informs about a javascript exceptions.voidtimeoutError(HtmlPage page, long allowedTime, long executionTime) Informs about a javascript timeout error.voidInforms about a javascript warning.
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOG
-
-
Constructor Details
-
DefaultJavaScriptErrorListener
public DefaultJavaScriptErrorListener()
-
-
Method Details
-
scriptException
Informs about a javascript exceptions.- Specified by:
scriptExceptionin interfaceJavaScriptErrorListener- Parameters:
page- the page that causes the problemscriptException- the occurred script exception
-
timeoutError
Informs about a javascript timeout error.- Specified by:
timeoutErrorin interfaceJavaScriptErrorListener- Parameters:
page- the page that causes the problemallowedTime- the max time allowed for the executionexecutionTime- the already consumed time
-
malformedScriptURL
public void malformedScriptURL(HtmlPage page, String url, MalformedURLException malformedURLException) Informs about a malformed url referencing to to script.- Specified by:
malformedScriptURLin interfaceJavaScriptErrorListener- Parameters:
page- the page that causes the problemurl- the malformed urlmalformedURLException- the occurred exception
-
loadScriptError
Informs about an exception during load of a javascript file refereed from a page.- Specified by:
loadScriptErrorin interfaceJavaScriptErrorListener- Parameters:
page- the page that causes the problemscriptUrl- the url to load the script fromexception- the occurred exception
-
warn
Informs about a javascript warning.- Specified by:
warnin interfaceJavaScriptErrorListener- Parameters:
message- the message to be displayedsourceName- the name of the source fileline- the line numberlineSource- the source code that failedlineOffset- the line offset
-