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

Unified Diff: sdk/lib/_internal/pub/lib/src/source/hosted.dart

Issue 114193010: Show the dependender(s) for missing packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years 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 | « sdk/lib/_internal/pub/lib/src/source/git.dart ('k') | sdk/lib/_internal/pub/lib/src/source/path.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/source/hosted.dart
diff --git a/sdk/lib/_internal/pub/lib/src/source/hosted.dart b/sdk/lib/_internal/pub/lib/src/source/hosted.dart
index 1429e2854603f5444ae1bf001e1befe8c48ddeb9..b8a361f78b48f0cb3843ba1e6f7cad0d803d0c22 100644
--- a/sdk/lib/_internal/pub/lib/src/source/hosted.dart
+++ b/sdk/lib/_internal/pub/lib/src/source/hosted.dart
@@ -156,16 +156,17 @@ class HostedSource extends Source {
String url) {
if (error is PubHttpException &&
error.response.statusCode == 404) {
- fail('Could not find package "$package" at $url.', error, stackTrace);
+ throw new PackageNotFoundException(
+ "Could not find package $package at $url.", error, stackTrace);
}
if (error is TimeoutException) {
- fail('Timed out trying to find package "$package" at $url.',
+ fail("Timed out trying to find package $package at $url.",
error, stackTrace);
}
if (error is io.SocketException) {
- fail('Got socket error trying to find package "$package" at $url.',
+ fail("Got socket error trying to find package $package at $url.",
error, stackTrace);
}
@@ -191,7 +192,7 @@ class OfflineHostedSource extends HostedSource {
.toList();
}).then((versions) {
// If there are no versions in the cache, report a clearer error.
- if (versions.isEmpty) fail('Could not find package "$name" in cache.');
+ if (versions.isEmpty) fail("Could not find package $name in cache.");
return versions;
});
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/source/git.dart ('k') | sdk/lib/_internal/pub/lib/src/source/path.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698