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

Unified Diff: utils/pub/package.dart

Issue 11369066: Show better error messages in network failures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
Index: utils/pub/package.dart
diff --git a/utils/pub/package.dart b/utils/pub/package.dart
index 8d84546ec8f676209b7164ce815c5293b948ff88..d2940f0cd670eb723e1e9d4fc208785460999f81 100644
--- a/utils/pub/package.dart
+++ b/utils/pub/package.dart
@@ -137,7 +137,10 @@ class PackageId implements Comparable {
other.version == version;
}
- String toString() => "$name $version from ${source.name}";
+ String toString() {
+ if (source.isDefault) return "$name $version";
+ return "$name $version from ${source.name}";
nweiz 2012/11/05 19:55:36 While we're cleaning up toStrings, maybe add a def
Bob Nystrom 2012/11/05 20:43:06 Good idea. Done.
+ }
int compareTo(Comparable other) {
if (other is! PackageId) throw new ArgumentError(other);
« utils/pub/hosted_source.dart ('K') | « utils/pub/io.dart ('k') | utils/pub/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698