Package org.htmlunit.javascript
Class HtmlUnitContextFactory.HtmlUnitErrorReporter
- java.lang.Object
-
- org.htmlunit.javascript.HtmlUnitContextFactory.HtmlUnitErrorReporter
-
- All Implemented Interfaces:
java.io.Serializable
,org.htmlunit.corejs.javascript.ErrorReporter
- Enclosing class:
- HtmlUnitContextFactory
private static final class HtmlUnitContextFactory.HtmlUnitErrorReporter extends java.lang.Object implements org.htmlunit.corejs.javascript.ErrorReporter, java.io.Serializable
-
-
Field Summary
Fields Modifier and Type Field Description private JavaScriptErrorListener
javaScriptErrorListener_
-
Constructor Summary
Constructors Constructor Description HtmlUnitErrorReporter(JavaScriptErrorListener javaScriptErrorListener)
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
error(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)
Logs an error.org.htmlunit.corejs.javascript.EvaluatorException
runtimeError(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)
Logs a runtime error.void
warning(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)
Logs a warning.
-
-
-
Field Detail
-
javaScriptErrorListener_
private final JavaScriptErrorListener javaScriptErrorListener_
-
-
Constructor Detail
-
HtmlUnitErrorReporter
HtmlUnitErrorReporter(JavaScriptErrorListener javaScriptErrorListener)
Ctor.- Parameters:
javaScriptErrorListener
- the listener to be used
-
-
Method Detail
-
warning
public void warning(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)
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
public void error(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)
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(java.lang.String message, java.lang.String sourceName, int line, java.lang.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
-
-