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 Details

  • Constructor Details

    • HtmlUnitErrorReporter

      HtmlUnitErrorReporter(JavaScriptErrorListener javaScriptErrorListener)
      Ctor.
      Parameters:
      javaScriptErrorListener - the listener to be used
  • Method Details

    • warning

      public void warning(String message, String sourceName, int line, String lineSource, int lineOffset)
      Logs a warning.
      Specified by:
      warning in interface org.htmlunit.corejs.javascript.ErrorReporter
      Parameters:
      message - the message to be displayed
      sourceName - the name of the source file
      line - the line number
      lineSource - the source code that failed
      lineOffset - the line offset
    • error

      public void error(String message, String sourceName, int line, String lineSource, int lineOffset)
      Logs an error.
      Specified by:
      error in interface org.htmlunit.corejs.javascript.ErrorReporter
      Parameters:
      message - the message to be displayed
      sourceName - the name of the source file
      line - the line number
      lineSource - the source code that failed
      lineOffset - 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 interface org.htmlunit.corejs.javascript.ErrorReporter
      Parameters:
      message - the message to be displayed
      sourceName - the name of the source file
      line - the line number
      lineSource - the source code that failed
      lineOffset - the line offset
      Returns:
      an evaluator exception