Class PrintStreamErrorManager

java.lang.Object
com.google.javascript.jscomp.BasicErrorManager
com.google.javascript.jscomp.PrintStreamErrorManager
All Implemented Interfaces:
ErrorHandler, ErrorManager

public class PrintStreamErrorManager extends BasicErrorManager

An error manager that prints errors and warnings to the print stream provided in addition to the functionality of the BasicErrorManager.

It collaborates with a SourceExcerptProvider via a MessageFormatter to display error messages with source context.

  • Constructor Details

    • PrintStreamErrorManager

      public PrintStreamErrorManager(MessageFormatter formatter, PrintStream stream)
      Creates an error manager.
      Parameters:
      formatter - the message formatter used to format the messages
      stream - the stream on which the errors and warnings should be printed. This class does not close the stream
    • PrintStreamErrorManager

      public PrintStreamErrorManager(PrintStream stream)
      Creates an instance with a source-less error formatter.
  • Method Details