Package org.htmlunit.javascript
Class SilentJavaScriptErrorListener
java.lang.Object
org.htmlunit.javascript.SilentJavaScriptErrorListener
- All Implemented Interfaces:
Serializable
,JavaScriptErrorListener
public class SilentJavaScriptErrorListener
extends Object
implements JavaScriptErrorListener, Serializable
Silent implementation of
JavaScriptErrorListener
that does no logging at all.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
loadScriptError
(HtmlPage page, URL scriptUrl, Exception exception) Informs about an exception during load of a javascript file refereed from a page.void
malformedScriptURL
(HtmlPage page, String url, MalformedURLException malformedURLException) Informs about a malformed url referencing to to script.void
scriptException
(HtmlPage page, ScriptException scriptException) Informs about a javascript exceptions.void
timeoutError
(HtmlPage page, long allowedTime, long executionTime) Informs about a javascript timeout error.void
Informs about a javascript warning.
-
Constructor Details
-
SilentJavaScriptErrorListener
public SilentJavaScriptErrorListener()
-
-
Method Details
-
scriptException
Description copied from interface:JavaScriptErrorListener
Informs about a javascript exceptions.- Specified by:
scriptException
in interfaceJavaScriptErrorListener
- Parameters:
page
- the page that causes the problemscriptException
- the occurred script exception
-
timeoutError
Description copied from interface:JavaScriptErrorListener
Informs about a javascript timeout error.- Specified by:
timeoutError
in 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) Description copied from interface:JavaScriptErrorListener
Informs about a malformed url referencing to to script.- Specified by:
malformedScriptURL
in interfaceJavaScriptErrorListener
- Parameters:
page
- the page that causes the problemurl
- the malformed urlmalformedURLException
- the occurred exception
-
loadScriptError
Description copied from interface:JavaScriptErrorListener
Informs about an exception during load of a javascript file refereed from a page.- Specified by:
loadScriptError
in interfaceJavaScriptErrorListener
- Parameters:
page
- the page that causes the problemscriptUrl
- the url to load the script fromexception
- the occurred exception
-
warn
Description copied from interface:JavaScriptErrorListener
Informs about a javascript warning.- Specified by:
warn
in 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
-