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

Unified Diff: lib/compiler/implementation/tree/nodes.dart

Issue 10891022: Update corelib/ and lib/ to use the new try-catch syntax. (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 | « lib/compiler/implementation/tools/mini_parser.dart ('k') | lib/compiler/implementation/typechecker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/tree/nodes.dart
diff --git a/lib/compiler/implementation/tree/nodes.dart b/lib/compiler/implementation/tree/nodes.dart
index 6ecdebe622b2bd8cea38be343d9fbb471a5e9eb9..c535d9a697bd9042dc5204530859e1056432fdc8 100644
--- a/lib/compiler/implementation/tree/nodes.dart
+++ b/lib/compiler/implementation/tree/nodes.dart
@@ -114,7 +114,7 @@ class Node implements Hashable {
Unparser unparser = new Unparser();
try {
return unparser.unparse(this);
- } catch (var e, var trace) {
+ } catch (e, trace) {
print(trace);
return '<<unparse error: ${getObjectDescription()}: ${unparser.sb}>>';
}
@@ -665,7 +665,7 @@ class LiteralInt extends Literal<int> {
Token valueToken = token;
if (valueToken.kind === PLUS_TOKEN) valueToken = valueToken.next;
return parseInt(valueToken.value.slowToString());
- } catch (FormatException ex) {
+ } on FormatException catch (ex) {
(this.handler)(token, ex);
}
}
@@ -684,7 +684,7 @@ class LiteralDouble extends Literal<double> {
Token valueToken = token;
if (valueToken.kind === PLUS_TOKEN) valueToken = valueToken.next;
return parseDouble(valueToken.value.slowToString());
- } catch (FormatException ex) {
+ } on FormatException catch (ex) {
(this.handler)(token, ex);
}
}
« no previous file with comments | « lib/compiler/implementation/tools/mini_parser.dart ('k') | lib/compiler/implementation/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698