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

Unified Diff: utils/pub/hosted_source.dart

Issue 11821006: Unwrap AsyncErrors to find real error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 11 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 | utils/pub/http.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/hosted_source.dart
diff --git a/utils/pub/hosted_source.dart b/utils/pub/hosted_source.dart
index 43922a21aae3287698e9f5f1fbe9737159b927a7..70b1440d297f093da1e20b8aad333f857786939e 100644
--- a/utils/pub/hosted_source.dart
+++ b/utils/pub/hosted_source.dart
@@ -119,6 +119,8 @@ class HostedSource extends Source {
/// this tries to translate into a more user friendly error message. Always
/// throws an error, either the original one or a better one.
void _throwFriendlyError(ex, package, url) {
+ ex = getRealError(ex);
+
if (ex is PubHttpException && ex.response.statusCode == 404) {
throw 'Could not find package "$package" at $url.';
}
« no previous file with comments | « no previous file | utils/pub/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698