Package com.google.javascript.jscomp

# 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 Summary

Constructors
Constructor
Description
`PrintStreamErrorManager(MessageFormatter formatter, PrintStream stream)`
Creates an error manager.
`PrintStreamErrorManager(PrintStream stream)`
Creates an instance with a source-less error formatter.

## Method Summary

Modifier and Type
Method
Description
`void`
`println(CheckLevel level, JSError error)`
Print a message with a trailing new line.
`void`
`printSummary()`
Print the summary of the compilation - number of errors and warnings.
`void`
`setSummaryDetailLevel(int summaryDetailLevel)`

### Methods inherited from class com.google.javascript.jscomp.BasicErrorManager

`generateReport, getErrorCount, getErrors, getTypedPercent, getWarningCount, getWarnings, report, setTypedPercent`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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

### println

public void println(CheckLevel level, JSError error)
Description copied from class: `BasicErrorManager`
Print a message with a trailing new line. This method is called by the `BasicErrorManager.generateReport()` method when generating messages.

Specified by:
  `println` in class `BasicErrorManager`

### setSummaryDetailLevel

public void setSummaryDetailLevel(int summaryDetailLevel)

### printSummary

public void printSummary()
Description copied from class: `BasicErrorManager`
Print the summary of the compilation - number of errors and warnings.

Specified by:
  `printSummary` in class `BasicErrorManager`