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

Side by Side 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: Cleanup 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * HTTP status codes. 8 * HTTP status codes.
9 */ 9 */
10 abstract class HttpStatus { 10 abstract class HttpStatus {
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 * this class. 1392 * this class.
1393 */ 1393 */
1394 abstract class DetachedSocket { 1394 abstract class DetachedSocket {
1395 Socket get socket; 1395 Socket get socket;
1396 List<int> get unparsedData; 1396 List<int> get unparsedData;
1397 } 1397 }
1398 1398
1399 1399
1400 class HttpException implements IOException { 1400 class HttpException implements IOException {
1401 final String message; 1401 final String message;
1402 final Uri uri;
1402 1403
1403 const HttpException([String this.message = ""]); 1404 const HttpException(String this.message, {Uri this.uri});
1404 1405
1405 String toString() => "HttpException: $message"; 1406 String toString() {
1407 var b = new StringBuffer();
1408 b.write('HttpException: ');
1409 b.write(message);
1410 if (uri != null) {
1411 b.write(', uri = $uri');
1412 }
1413 return b.toString();
1414 }
1406 } 1415 }
1407 1416
1408 1417
1409 class RedirectException implements HttpException { 1418 class RedirectException implements HttpException {
1410 final String message; 1419 final String message;
1411 final List<RedirectInfo> redirects; 1420 final List<RedirectInfo> redirects;
1412 1421
1413 const RedirectException(String this.message, 1422 const RedirectException(String this.message,
1414 List<RedirectInfo> this.redirects); 1423 List<RedirectInfo> this.redirects);
1415 1424
1416 String toString() => "RedirectException: $message"; 1425 String toString() => "RedirectException: $message";
1417 } 1426 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698