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

Unified Diff: sdk/lib/_internal/pub/lib/src/utils.dart

Issue 216603010: Rip out dart:io from pkg/http wherever possible. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 9 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 | « sdk/lib/_internal/pub/bin/pub.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/utils.dart
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
index 719b29efbdc767ae27a2b532c6dffd7bc8325cf0..2dec8034a8d580f9781d881d826303751189d21e 100644
--- a/sdk/lib/_internal/pub/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart
@@ -15,6 +15,7 @@ import 'dart:mirrors';
import "package:analyzer/analyzer.dart";
import "package:crypto/crypto.dart";
+import "package:http/http.dart" as http;
import 'package:path/path.dart' as path;
import "package:stack_trace/stack_trace.dart";
@@ -833,6 +834,8 @@ void fail(String message, [innerError, StackTrace innerTrace]) {
/// All the names of user-facing exceptions.
final _userFacingExceptions = new Set<String>.from([
'ApplicationException',
+ // This refers to http.ClientException.
+ 'ClientException',
// Errors coming from the Dart analyzer are probably caused by syntax errors
// in user code, so they're user-facing.
'AnalyzerError', 'AnalyzerErrorGroup',
@@ -840,7 +843,7 @@ final _userFacingExceptions = new Set<String>.from([
// invalid import.
'IsolateSpawnException',
// TODO(nweiz): clean up the dart:io errors when issue 9955 is fixed.
- 'FileSystemException', 'HttpException', 'HttpException', 'OSError',
+ 'FileSystemException', 'HttpException', 'OSError',
'ProcessException', 'SocketException', 'WebSocketException'
]);
@@ -859,7 +862,7 @@ bool isUserFacingException(error) {
error is IsolateSpawnException ||
error is FileSystemException ||
error is HttpException ||
- error is HttpException ||
+ error is http.ClientException ||
error is OSError ||
error is ProcessException ||
error is SocketException ||
« no previous file with comments | « sdk/lib/_internal/pub/bin/pub.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698