| Index: compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java
|
| diff --git a/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java b/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java
|
| index a13218ab76475a9f58318230bd44e09252f0b1d5..bd9a5a4b5a01fe7072383135c42cee568a1b99f3 100644
|
| --- a/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java
|
| +++ b/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java
|
| @@ -33,16 +33,17 @@ public class DefaultDartCompilerListener extends DartCompilerListener {
|
| * Formatter used to report error messages. Marked protected so that
|
| * subclasses can override it (e.g. for a test server using HTML formatting).
|
| */
|
| - protected ErrorFormatter formatter = new PrettyErrorFormatter(useColor());
|
| + protected final ErrorFormatter formatter;
|
|
|
| - public DefaultDartCompilerListener() {
|
| + public DefaultDartCompilerListener(boolean printMachineProblems) {
|
| + this(System.err, printMachineProblems);
|
| }
|
|
|
| /**
|
| * @param outputStream the {@link PrintStream} to use for {@link ErrorFormatter}.
|
| */
|
| - public DefaultDartCompilerListener(PrintStream outputStream) {
|
| - ((PrettyErrorFormatter) formatter).setOutputStream(outputStream);
|
| + public DefaultDartCompilerListener(PrintStream outputStream, boolean printMachineProblems) {
|
| + formatter = new PrettyErrorFormatter(outputStream, useColor(), printMachineProblems);
|
| }
|
|
|
| @Override
|
|
|