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

Unified Diff: runtime/bin/http_impl.dart

Issue 9699017: Start better error reporting for sockets (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed bug Created 8 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 | « runtime/bin/http.dart ('k') | runtime/bin/socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http_impl.dart
diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart
index e5844f46de7cc15c8d15c7ed77f497abf249c037..b79a2cfcd9e0722ff12745fb1ef6e4294a6c21fb 100644
--- a/runtime/bin/http_impl.dart
+++ b/runtime/bin/http_impl.dart
@@ -509,11 +509,11 @@ class _HttpConnectionBase implements Hashable {
if (_onDisconnectCallback != null) _onDisconnectCallback();
}
- void _onError() {
+ void _onError(Exception e) {
// If an error occours, treat the socket as closed.
_onClosed();
if (_onErrorCallback != null) {
- _onErrorCallback("Connection closed while sending data to client.");
+ _onErrorCallback("Connection closed while sending data to client ($e).");
}
}
@@ -1070,7 +1070,7 @@ class _HttpClient implements HttpClient {
_activeSockets.add(socketConn);
_connectionOpened(socketConn, connection);
};
- socket.onError = () {
+ socket.onError = (Exception e) {
if (_onError !== null) {
_onError(HttpStatus.NETWORK_CONNECT_TIMEOUT_ERROR);
}
« no previous file with comments | « runtime/bin/http.dart ('k') | runtime/bin/socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698