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 JavaScriptErrorListenerjavaScriptErrorListener_
-
Constructor Summary
Constructors Constructor Description HtmlUnitErrorReporter(JavaScriptErrorListener javaScriptErrorListener)Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)Logs an error.org.htmlunit.corejs.javascript.EvaluatorExceptionruntimeError(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)Logs a runtime error.voidwarning(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:
warningin 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:
errorin 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:
runtimeErrorin 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
-
-