Package org.htmlunit.javascript
Class HtmlUnitContextFactory.HtmlUnitErrorReporter
java.lang.Object
org.htmlunit.javascript.HtmlUnitContextFactory.HtmlUnitErrorReporter
- All Implemented Interfaces:
Serializable
,org.htmlunit.corejs.javascript.ErrorReporter
- Enclosing class:
HtmlUnitContextFactory
private static final class HtmlUnitContextFactory.HtmlUnitErrorReporter
extends Object
implements org.htmlunit.corejs.javascript.ErrorReporter, Serializable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHtmlUnitErrorReporter
(JavaScriptErrorListener javaScriptErrorListener) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Logs an error.org.htmlunit.corejs.javascript.EvaluatorException
runtimeError
(String message, String sourceName, int line, String lineSource, int lineOffset) Logs a runtime error.void
Logs a warning.
-
Field Details
-
javaScriptErrorListener_
-
-
Constructor Details
-
HtmlUnitErrorReporter
HtmlUnitErrorReporter(JavaScriptErrorListener javaScriptErrorListener) Ctor.- Parameters:
javaScriptErrorListener
- the listener to be used
-
-
Method Details
-
warning
Logs a warning.- Specified by:
warning
in interfaceorg.htmlunit.corejs.javascript.ErrorReporter
- Parameters:
message
- the message to be displayedsourceName
- the name of the source fileline
- the line numberlineSource
- the source code that failedlineOffset
- the line offset
-
error
Logs an error.- Specified by:
error
in interfaceorg.htmlunit.corejs.javascript.ErrorReporter
- Parameters:
message
- the message to be displayedsourceName
- the name of the source fileline
- the line numberlineSource
- the source code that failedlineOffset
- the line offset
-
runtimeError
public org.htmlunit.corejs.javascript.EvaluatorException runtimeError(String message, String sourceName, int line, String lineSource, int lineOffset) Logs a runtime error.- Specified by:
runtimeError
in interfaceorg.htmlunit.corejs.javascript.ErrorReporter
- Parameters:
message
- the message to be displayedsourceName
- the name of the source fileline
- the line numberlineSource
- the source code that failedlineOffset
- the line offset- Returns:
- an evaluator exception
-