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

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

Issue 18768002: Add 'uri' to HttpException, and include in toString. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | sdk/lib/io/http_impl.dart » ('j') | sdk/lib/io/http_impl.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http.dart
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index 09b7d8c9cf827e97b8e0c6f69a8b6360efaf0602..3b6697e5c6f81deadc6b406134ebeb12e2dd9419 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -1400,9 +1400,19 @@ abstract class DetachedSocket {
class HttpException implements IOException {
final String message;
Bill Hesse 2013/07/05 12:57:45 Remove the blank line here?
Anders Johnsen 2013/08/20 05:46:31 Done.
- const HttpException([String this.message = ""]);
-
- String toString() => "HttpException: $message";
+ final Uri uri;
+
+ const HttpException(String this.message, {Uri this.uri});
+
+ String toString() {
+ var b = new StringBuffer();
+ b.write('HttpException: ');
+ b.write(message);
+ if (uri != null) {
+ b.write(', uri = $uri');
+ }
+ return b.toString();
Bill Hesse 2013/07/05 12:57:45 How about (uri == null) ? "HttpException: $messag
Anders Johnsen 2013/08/20 05:46:31 We use buffers in other exceptions, I think it's f
+ }
}
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | sdk/lib/io/http_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698