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

Unified Diff: runtime/bin/http.dart

Issue 9834008: Add error handling to the HTTP library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | runtime/bin/http_impl.dart » ('j') | runtime/bin/http_impl.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http.dart
diff --git a/runtime/bin/http.dart b/runtime/bin/http.dart
index 9588e0049c97852d7099e656a454441aebd8b37b..0296f7b91b9740a1be846d35c7a2645643c9bdb9 100644
--- a/runtime/bin/http.dart
+++ b/runtime/bin/http.dart
@@ -83,12 +83,12 @@ interface HttpServer default _HttpServer {
/**
* Sets the handler that gets called when a new HTTP request is received.
*/
- void set onRequest(void handler(HttpRequest, HttpResponse));
+ void set onRequest(void callback(HttpRequest, HttpResponse));
/**
* Sets the error handler that is called when a connection error occurs.
*/
- void set onError(void handler(String errorMessage));
+ void set onError(void callback(Exception e));
}
@@ -278,7 +278,7 @@ interface HttpClientConnection {
/**
* Sets the handler that is called when the connection is established.
*/
- void set onRequest(void handler(HttpClientRequest request));
+ void set onRequest(void callback(HttpClientRequest request));
/**
* Sets callback to be called when the request has been send and
@@ -286,13 +286,13 @@ interface HttpClientConnection {
* all headers of the response are received and data is ready to be
* received.
*/
- void set onResponse(void handler(HttpClientResponse response));
+ void set onResponse(void callback(HttpClientResponse response));
/**
* Sets the handler that gets called if an error occurs while
- * processing the HTTP request.
+ * connecting or processing the HTTP request.
*/
- void set onError(void handler(HttpException e));
+ void set onError(void callback(Exception e));
}
« no previous file with comments | « no previous file | runtime/bin/http_impl.dart » ('j') | runtime/bin/http_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698