Package org.htmlunit.javascript
Interface JavaScriptErrorListener
-
- All Known Implementing Classes:
DefaultJavaScriptErrorListener,SilentJavaScriptErrorListener
public interface JavaScriptErrorListenerA listener for JavaScript exceptions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidloadScriptError(HtmlPage page, java.net.URL scriptUrl, java.lang.Exception exception)Informs about an exception during load of a javascript file refereed from a page.voidmalformedScriptURL(HtmlPage page, java.lang.String url, java.net.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.voidwarn(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)Informs about a javascript warning.
-
-
-
Method Detail
-
scriptException
void scriptException(HtmlPage page, ScriptException scriptException)
Informs about a javascript exceptions.- Parameters:
page- the page that causes the problemscriptException- the occurred script exception
-
timeoutError
void timeoutError(HtmlPage page, long allowedTime, long executionTime)
Informs about a javascript timeout error.- Parameters:
page- the page that causes the problemallowedTime- the max time allowed for the executionexecutionTime- the already consumed time
-
malformedScriptURL
void malformedScriptURL(HtmlPage page, java.lang.String url, java.net.MalformedURLException malformedURLException)
Informs about a malformed url referencing to to script.- Parameters:
page- the page that causes the problemurl- the malformed urlmalformedURLException- the occurred exception
-
loadScriptError
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.- Parameters:
page- the page that causes the problemscriptUrl- the url to load the script fromexception- the occurred exception
-
warn
void warn(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)Informs about a javascript warning.- Parameters:
message- the message to be displayedsourceName- the name of the source fileline- the line numberlineSource- the source code that failedlineOffset- the line offset
-
-