public class DefaultJavaScriptErrorListener extends Object implements JavaScriptErrorListener, Serializable
JavaScriptErrorListener
that does
default logging.Constructor and Description |
---|
DefaultJavaScriptErrorListener() |
Modifier and Type | Method and Description |
---|---|
void |
loadScriptError(HtmlPage page,
URL scriptUrl,
Exception exception)
Informs about an exception during load of a javascript file refereed from a page.
|
void |
malformedScriptURL(HtmlPage page,
String url,
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(String message,
String sourceName,
int line,
String lineSource,
int lineOffset)
Informs about a javascript warning.
|
public void scriptException(HtmlPage page, ScriptException scriptException)
scriptException
in interface JavaScriptErrorListener
page
- the page that causes the problemscriptException
- the occurred script exceptionpublic void timeoutError(HtmlPage page, long allowedTime, long executionTime)
timeoutError
in interface JavaScriptErrorListener
page
- the page that causes the problemallowedTime
- the max time allowed for the executionexecutionTime
- the already consumed timepublic void malformedScriptURL(HtmlPage page, String url, MalformedURLException malformedURLException)
malformedScriptURL
in interface JavaScriptErrorListener
page
- the page that causes the problemurl
- the malformed urlmalformedURLException
- the occurred exceptionpublic void loadScriptError(HtmlPage page, URL scriptUrl, Exception exception)
loadScriptError
in interface JavaScriptErrorListener
page
- the page that causes the problemscriptUrl
- the url to load the script fromexception
- the occurred exceptionpublic void warn(String message, String sourceName, int line, String lineSource, int lineOffset)
warn
in interface JavaScriptErrorListener
message
- the message to be displayedsourceName
- the name of the source fileline
- the line numberlineSource
- the source code that failedlineOffset
- the line offsetCopyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.