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

Unified Diff: pkg/compiler/lib/src/io/start_end_information.dart

Issue 1248483008: Split MessageKind into a MessageKind key and a MessageTemplate. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 5 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 | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/scanner/listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/io/start_end_information.dart
diff --git a/pkg/compiler/lib/src/io/start_end_information.dart b/pkg/compiler/lib/src/io/start_end_information.dart
index 4547fca54bf5148b4602d4b9343bd68f9f26aae1..68469eb34efbbcd0135608877c8f905d45029750 100644
--- a/pkg/compiler/lib/src/io/start_end_information.dart
+++ b/pkg/compiler/lib/src/io/start_end_information.dart
@@ -9,6 +9,7 @@ library dart2js.source_information.start_end;
import '../dart2jslib.dart' show
MessageKind,
+ MessageTemplate,
SourceSpan;
import '../elements/elements.dart' show
AstElement,
@@ -182,10 +183,11 @@ class StartEndSourceInformationBuilder extends SourceInformationBuilder {
void checkValidSourceFileLocation(
SourceLocation location, SourceFile sourceFile, int offset) {
if (!location.isValid) {
- throw MessageKind.INVALID_SOURCE_FILE_LOCATION.message(
- {'offset': offset,
- 'fileName': sourceFile.filename,
- 'length': sourceFile.length});
+ throw MessageTemplate.TEMPLATES[MessageKind.INVALID_SOURCE_FILE_LOCATION]
+ .message(
+ {'offset': offset,
+ 'fileName': sourceFile.filename,
+ 'length': sourceFile.length});
}
}
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/scanner/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698