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

Unified Diff: sdk/lib/io/http_impl.dart

Issue 1010403002: Ensure that stack traces are propagated more often in dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tab to space Created 5 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/io/file_impl.dart ('k') | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index dd03aeb7218d5d54a50f19eb7534c2386965360f..bd382bccc28d645f8faae0cee7bfd58069cb6433 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1055,11 +1055,11 @@ class _HttpOutgoing implements StreamConsumer<List<int>> {
return socket.addStream(controller.stream)
.then((_) {
return outbound;
- }, onError: (error) {
+ }, onError: (error, stackTrace) {
// Be sure to close it in case of an error.
if (_gzip) _gzipSink.close();
_socketError = true;
- _doneCompleter.completeError(error);
+ _doneCompleter.completeError(error, stackTrace);
if (_ignoreError(error)) {
return outbound;
} else {
@@ -1133,8 +1133,8 @@ class _HttpOutgoing implements StreamConsumer<List<int>> {
.then((_) {
_doneCompleter.complete(socket);
return outbound;
- }, onError: (error) {
- _doneCompleter.completeError(error);
+ }, onError: (error, stackTrace) {
+ _doneCompleter.completeError(error, stackTrace);
if (_ignoreError(error)) {
return outbound;
} else {
@@ -2246,11 +2246,11 @@ class _HttpServer
_HttpConnection connection = new _HttpConnection(socket, this);
_idleConnections.add(connection);
},
- onError: (error) {
+ onError: (error, stackTrace) {
// Ignore HandshakeExceptions as they are bound to a single request,
// and are not fatal for the server.
if (error is! HandshakeException) {
- _controller.addError(error);
+ _controller.addError(error, stackTrace);
}
},
onDone: _controller.close);
@@ -2315,10 +2315,6 @@ class _HttpServer
}
}
- void _handleError(error) {
- if (!closed) _controller.addError(error);
- }
-
void _connectionClosed(_HttpConnection connection) {
// Remove itself from either idle or active connections.
connection.unlink();
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698