Package org.htmlunit.javascript
Class SilentJavaScriptErrorListener
- java.lang.Object
-
- org.htmlunit.javascript.SilentJavaScriptErrorListener
-
- All Implemented Interfaces:
java.io.Serializable
,JavaScriptErrorListener
public class SilentJavaScriptErrorListener extends java.lang.Object implements JavaScriptErrorListener, java.io.Serializable
Silent implementation ofJavaScriptErrorListener
that does no logging at all.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SilentJavaScriptErrorListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
loadScriptError(HtmlPage page, java.net.URL scriptUrl, java.lang.Exception exception)
Informs about an exception during load of a javascript file refereed from a page.void
malformedScriptURL(HtmlPage page, java.lang.String url, java.net.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
warn(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)
Informs about a javascript warning.
-
-
-
Method Detail
-
scriptException
public void scriptException(HtmlPage page, ScriptException 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
public void timeoutError(HtmlPage page, long allowedTime, long executionTime)
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, java.lang.String url, java.net.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
public void loadScriptError(HtmlPage page, java.net.URL scriptUrl, java.lang.Exception exception)
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
public void warn(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)
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
-
-