| Index: compiler/java/com/google/dart/compiler/PrettyErrorFormatter.java
|
| diff --git a/compiler/java/com/google/dart/compiler/PrettyErrorFormatter.java b/compiler/java/com/google/dart/compiler/PrettyErrorFormatter.java
|
| index 315a8fb1147c1f435e32102a18b506c43100a4f6..0baa65174e68e71d25a723d2fbdde7380f532f0e 100644
|
| --- a/compiler/java/com/google/dart/compiler/PrettyErrorFormatter.java
|
| +++ b/compiler/java/com/google/dart/compiler/PrettyErrorFormatter.java
|
| @@ -85,27 +85,7 @@ public class PrettyErrorFormatter extends DefaultErrorFormatter {
|
| buf.append(event.getErrorCode().getErrorSeverity() == ErrorSeverity.WARNING
|
| ? WARNING_BOLD_COLOR : ERROR_BOLD_COLOR);
|
| }
|
| - if (errorFormat == ErrorFormat.MACHINE) {
|
| - buf.append(String.format(
|
| - "%s|%s|%s|%s|%d|%d|%d|%s",
|
| - escapePipe(event.getErrorCode().getErrorSeverity().toString()),
|
| - escapePipe(event.getErrorCode().getSubSystem().toString()),
|
| - escapePipe(event.getErrorCode().toString()),
|
| - escapePipe(getSourceName(sourceFile)),
|
| - event.getLineNumber(),
|
| - 1 + col,
|
| - length,
|
| - escapePipe(event.getMessage())));
|
| - } else {
|
| - String sourceName = sourceFile.getUri().toString();
|
| - String includeFrom = getImportString(sourceFile);
|
| - buf.append(String.format(
|
| - "%s:%d: %s%s",
|
| - sourceName,
|
| - event.getLineNumber(),
|
| - event.getMessage(),
|
| - includeFrom));
|
| - }
|
| + appendError(buf, event);
|
| if (useColor) {
|
| buf.append(NO_COLOR);
|
| }
|
| @@ -153,24 +133,6 @@ public class PrettyErrorFormatter extends DefaultErrorFormatter {
|
| }
|
| }
|
| }
|
| -
|
| - private static String getSourceName(Source source) {
|
| - if (source instanceof UrlDartSource) {
|
| - return source.getUri().toString();
|
| - }
|
| - return source.getName();
|
| - }
|
| -
|
| - private String escapePipe(String input) {
|
| - StringBuilder result = new StringBuilder();
|
| - for (char c : input.toCharArray()) {
|
| - if (c == '\\' || c == '|') {
|
| - result.append('\\');
|
| - }
|
| - result.append(c);
|
| - }
|
| - return result.toString();
|
| - }
|
|
|
| private String getLineAt(BufferedReader reader, int line) throws IOException {
|
| if (line <= 0) {
|
|
|