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 TypeMethodDescriptionvoidAssert that aScriptExceptionoccurred within the JavaScript executing on the associatedWebClient.org.htmlunit.ScriptExceptionGet the lastScriptException.org.htmlunit.ScriptExceptionGet the lastScriptException.voidloadScriptError(org.htmlunit.html.HtmlPage htmlPage, URL scriptUrl, Exception exception) voidmalformedScriptURL(org.htmlunit.html.HtmlPage htmlPage, String url, MalformedURLException malformedURLException) voidscriptException(org.htmlunit.html.HtmlPage htmlPage, org.htmlunit.ScriptException scriptException) voidtimeoutError(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, ornullif 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:
scriptExceptionin interfaceorg.htmlunit.javascript.JavaScriptErrorListener
-
assertHasException
public void assertHasException()Assert that aScriptExceptionoccurred within the JavaScript executing on the associatedWebClient. -
timeoutError
public void timeoutError(org.htmlunit.html.HtmlPage htmlPage, long allowedTime, long executionTime) - Specified by:
timeoutErrorin interfaceorg.htmlunit.javascript.JavaScriptErrorListener
-
malformedScriptURL
public void malformedScriptURL(org.htmlunit.html.HtmlPage htmlPage, String url, MalformedURLException malformedURLException) - Specified by:
malformedScriptURLin interfaceorg.htmlunit.javascript.JavaScriptErrorListener
-
loadScriptError
public void loadScriptError(org.htmlunit.html.HtmlPage htmlPage, URL scriptUrl, Exception exception) - Specified by:
loadScriptErrorin interfaceorg.htmlunit.javascript.JavaScriptErrorListener
-
warn
- Specified by:
warnin interfaceorg.htmlunit.javascript.JavaScriptErrorListener
-