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

Unified Diff: runtime/bin/http_impl.dart

Issue 10887023: Use new try-catch syntax in runtime/, tools/, and utils/. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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/file_impl.dart ('k') | runtime/bin/http_parser.dart » ('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 0ee4bd6541d8100c3b8b01d5f9188b06de06658c..25a448c970f8d2b806dd4e7139cb3047baace162 100644
--- a/runtime/bin/http_impl.dart
+++ b/runtime/bin/http_impl.dart
@@ -86,7 +86,7 @@ class _HttpHeaders implements HttpHeaders {
if (values != null) {
try {
return _HttpUtils.parseDate(values[0]);
- } catch (Exception e) {
+ } on Exception catch (e) {
return null;
}
}
@@ -105,7 +105,7 @@ class _HttpHeaders implements HttpHeaders {
if (values != null) {
try {
return _HttpUtils.parseDate(values[0]);
- } catch (Exception e) {
+ } on Exception catch (e) {
return null;
}
}
@@ -124,7 +124,7 @@ class _HttpHeaders implements HttpHeaders {
if (values != null) {
try {
return _HttpUtils.parseDate(values[0]);
- } catch (Exception e) {
+ } on Exception catch (e) {
return null;
}
}
@@ -194,7 +194,7 @@ class _HttpHeaders implements HttpHeaders {
} else {
try {
_port = parseInt(value.substring(pos + 1));
- } catch (FormatException e) {
+ } on FormatException catch (e) {
_port = null;
}
}
@@ -1286,7 +1286,7 @@ class _HttpConnectionBase implements Hashable {
info.remotePort = _socket.remotePort;
info.localPort = _socket.port;
return info;
- } catch (var e) { }
+ } catch (e) { }
return null;
}
@@ -1498,7 +1498,7 @@ class _HttpServer implements HttpServer {
Function handler = _handlers[i]._handler;
try {
handler(request, response);
- } catch (var e) {
+ } catch (e) {
if (_onError != null) {
_onError(e);
} else {
« no previous file with comments | « runtime/bin/file_impl.dart ('k') | runtime/bin/http_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698