Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: pkg/front_end/lib/src/fasta/builder/library_builder.dart

Issue 2717673002: Use printUnexpected and add location information. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/errors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/builder/library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/builder/library_builder.dart b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
index 61ec1a2ede56f50325cc42210db5f2675055182e..3e63f2d5a5de49a6aaea9ea81d0249859a66e28b 100644
--- a/pkg/front_end/lib/src/fasta/builder/library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
@@ -9,7 +9,8 @@ import '../combinator.dart' show
import '../errors.dart' show
InputError,
- internalError;
+ internalError,
+ printUnexpected;
import '../export.dart' show
Export;
@@ -63,9 +64,8 @@ abstract class LibraryBuilder<T extends TypeBuilder, R> extends Builder {
void addCompileTimeError(int charOffset, Object message, [Uri fileUri]) {
fileUri ??= this.fileUri;
- InputError error = new InputError(fileUri, charOffset, message);
- compileTimeErrors.add(error);
- print(error.format());
+ printUnexpected(fileUri, charOffset, message);
+ compileTimeErrors.add(new InputError(fileUri, charOffset, message));
}
bool addToExportScope(String name, Builder member);
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698