Package org.htmlunit
Class WebClientUtil.ExceptionListener
java.lang.Object
org.htmlunit.WebClientUtil.ExceptionListener
- All Implemented Interfaces:
org.htmlunit.javascript.JavaScriptErrorListener
- Enclosing class:
- WebClientUtil
public static class WebClientUtil.ExceptionListener
extends Object
implements org.htmlunit.javascript.JavaScriptErrorListener
JavaScript Exception listener.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Assert that aScriptException
occurred within the JavaScript executing on the associatedWebClient
.org.htmlunit.ScriptException
Get the lastScriptException
.org.htmlunit.ScriptException
Get the lastScriptException
.void
loadScriptError
(org.htmlunit.html.HtmlPage htmlPage, URL scriptUrl, Exception exception) void
malformedScriptURL
(org.htmlunit.html.HtmlPage htmlPage, String url, MalformedURLException malformedURLException) void
scriptException
(org.htmlunit.html.HtmlPage htmlPage, org.htmlunit.ScriptException scriptException) void
timeoutError
(org.htmlunit.html.HtmlPage htmlPage, long allowedTime, long executionTime) void
-
Method Details
-
getScriptException
public org.htmlunit.ScriptException getScriptException()Get the lastScriptException
.- Returns:
- The last
ScriptException
, ornull
if none happened.
-
getExpectedScriptException
public org.htmlunit.ScriptException getExpectedScriptException()Get the lastScriptException
.Performs a call to
assertHasException()
.- Returns:
- The last
ScriptException
.
-
scriptException
public void scriptException(org.htmlunit.html.HtmlPage htmlPage, org.htmlunit.ScriptException scriptException) - Specified by:
scriptException
in interfaceorg.htmlunit.javascript.JavaScriptErrorListener
-
assertHasException
public void assertHasException()Assert that aScriptException
occurred within the JavaScript executing on the associatedWebClient
. -
timeoutError
public void timeoutError(org.htmlunit.html.HtmlPage htmlPage, long allowedTime, long executionTime) - Specified by:
timeoutError
in interfaceorg.htmlunit.javascript.JavaScriptErrorListener
-
malformedScriptURL
public void malformedScriptURL(org.htmlunit.html.HtmlPage htmlPage, String url, MalformedURLException malformedURLException) - Specified by:
malformedScriptURL
in interfaceorg.htmlunit.javascript.JavaScriptErrorListener
-
loadScriptError
public void loadScriptError(org.htmlunit.html.HtmlPage htmlPage, URL scriptUrl, Exception exception) - Specified by:
loadScriptError
in interfaceorg.htmlunit.javascript.JavaScriptErrorListener
-
warn
- Specified by:
warn
in interfaceorg.htmlunit.javascript.JavaScriptErrorListener
-