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

Unified Diff: utils/pub/io.dart

Issue 10909073: Use right errno on Linux. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index f24dfd4e0e2e7a15c5df32b60ff80851ceda5102..f88f130cac224d4754c81cd3e6a71451cc1fd62d 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -325,7 +325,8 @@ Future<String> httpGetString(uri) {
connection.onError = (e) {
// Show a friendly error if the URL couldn't be resolved.
- if (e is SocketIOException && e.osError.errorCode == 8) {
+ if (e is SocketIOException &&
+ (e.osError.errorCode == 8 || e.osError.errorCode == -2)) {
e = 'Could not resolve URL "${uri.origin}".';
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698