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

Unified Diff: tests/language/try_catch3_test.dart

Issue 10905013: Change a few more uses of the old 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 | « tests/language/named_parameters4_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/try_catch3_test.dart
diff --git a/tests/language/try_catch3_test.dart b/tests/language/try_catch3_test.dart
index d1701fd7f9bd1de0a4bfac50d992ef79ce4cfd36..804b38e4c63aa9f968a3c395eef55754aa26feaa 100644
--- a/tests/language/try_catch3_test.dart
+++ b/tests/language/try_catch3_test.dart
@@ -37,52 +37,52 @@ class Helper {
try {
int k = f2();
f3();
- } catch (MyException ex) {
+ } on MyException catch (ex) {
int i = 10;
print(i);
- } catch (TestException ex) {
+ } on TestException catch (ex) {
int k = 10;
print(k);
}
try {
j = j + 24;
- } catch (var e) {
+ } catch (e) {
i = 300;
print(e.getMessage());
}
try {
j += 20;
- } catch (final e) {
+ } catch (e) {
i = 400;
print(e.getMessage());
}
try {
j += 40;
- } catch (var e) {
+ } catch (e) {
i = 600;
print(e.getMessage());
}
try {
j += 60;
- } catch (var e, var trace) {
+ } catch (e, trace) {
i = 700;
trace.printStackTrace(e);
print(e.getMessage());
}
try {
j += 80;
- } catch (final MyException e) {
+ } on MyException catch (e) {
i = 500;
print(e.getMessage());
}
- } catch (MyParameterizedException<String, TestException> e, var trace) {
+ } on MyParameterizedException<String, TestException> catch (e, trace) {
i = 800;
trace.printStackTrace(e);
throw;
- } catch (MyException exception) {
+ } on MyException catch (exception) {
i = 100;
print(exception.getMessage());
- } catch (TestException e, StackTrace trace) {
+ } on TestException catch (e, trace) {
i = 200;
trace.printStackTrace(e);
} finally {
« no previous file with comments | « tests/language/named_parameters4_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698