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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertHasException()Assert that aScriptExceptionoccurred within the JavaScript executing on the associatedWebClient.org.htmlunit.ScriptExceptiongetExpectedScriptException()Get the lastScriptException.org.htmlunit.ScriptExceptiongetScriptException()Get 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)voidwarn(String message, String sourceName, int line, String lineSource, int lineOffset)
-
-
-
Method Detail
-
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
-
-