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

Unified Diff: pkg/source_maps/lib/span.dart

Issue 346983002: Improve the readability of some human-consumed strings in source_maps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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/source_maps/CHANGELOG.md ('k') | pkg/source_maps/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/source_maps/lib/span.dart
diff --git a/pkg/source_maps/lib/span.dart b/pkg/source_maps/lib/span.dart
index cc48f190d2e70988ef602aa46ea2ae915c7cf95c..91cfcd39c9e7c493ec449f2a0996a9e41a0f8334 100644
--- a/pkg/source_maps/lib/span.dart
+++ b/pkg/source_maps/lib/span.dart
@@ -64,7 +64,9 @@ abstract class Span implements Comparable {
String getLocationMessage(String message,
{bool useColors: false, String color}) {
- return '$formatLocation: $message';
+ var source = url == null ? '' : ' of ${p.prettyUri(url)}';
+ return 'line ${start.line + 1}, column ${start.column + 1}$source: ' +
+ message;
}
bool operator ==(Span other) =>
@@ -375,7 +377,8 @@ class SpanException implements Exception {
String toString({bool useColors: false, String color}) {
if (span == null) return message;
- return span.getLocationMessage(message, useColors: useColors, color: color);
+ return "Error on " + span.getLocationMessage(message,
+ useColors: useColors, color: color);
}
}
« no previous file with comments | « pkg/source_maps/CHANGELOG.md ('k') | pkg/source_maps/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698