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

Unified Diff: utils/pub/http.dart

Issue 14251006: Remove AsyncError with Expando. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 8 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 | « utils/pub/hosted_source.dart ('k') | utils/pub/io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/http.dart
diff --git a/utils/pub/http.dart b/utils/pub/http.dart
index dadc4b12959399b5f915a70e2db97d9ad34f5154..8df0575fe0a8084d14c41e73e954945d7484cb50 100644
--- a/utils/pub/http.dart
+++ b/utils/pub/http.dart
@@ -61,21 +61,21 @@ class PubHttpClient extends http.BaseClient {
return http.Response.fromStream(streamedResponse).then((response) {
throw new PubHttpException(response);
});
- }).catchError((asyncError) {
- if (asyncError.error is SocketIOException &&
- asyncError.error.osError != null) {
- if (asyncError.error.osError.errorCode == 8 ||
- asyncError.error.osError.errorCode == -2 ||
- asyncError.error.osError.errorCode == -5 ||
- asyncError.error.osError.errorCode == 11001 ||
- asyncError.error.osError.errorCode == 11004) {
+ }).catchError((error) {
+ if (error is SocketIOException &&
+ error.osError != null) {
+ if (error.osError.errorCode == 8 ||
+ error.osError.errorCode == -2 ||
+ error.osError.errorCode == -5 ||
+ error.osError.errorCode == 11001 ||
+ error.osError.errorCode == 11004) {
throw 'Could not resolve URL "${request.url.origin}".';
- } else if (asyncError.error.osError.errorCode == -12276) {
+ } else if (error.osError.errorCode == -12276) {
throw 'Unable to validate SSL certificate for '
'"${request.url.origin}".';
}
}
- throw asyncError;
+ throw error;
}), HTTP_TIMEOUT, 'fetching URL "${request.url}"');
}
« no previous file with comments | « utils/pub/hosted_source.dart ('k') | utils/pub/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698