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

Unified Diff: pkg/unittest/core_matchers.dart

Issue 10917006: More uses of 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 | « pkg/intl/lib/date_format_field.dart ('k') | pkg/unittest/vm_config.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/core_matchers.dart
diff --git a/pkg/unittest/core_matchers.dart b/pkg/unittest/core_matchers.dart
index b696dce4aec51c7ecf655e59f32dba05a855bdad..e80b58fb26c8203d01a5bd910e5dd09bbd199c9d 100644
--- a/pkg/unittest/core_matchers.dart
+++ b/pkg/unittest/core_matchers.dart
@@ -300,7 +300,7 @@ class _Throws extends BaseMatcher {
try {
item();
return false;
- } catch (final e, final s) {
+ } catch (e, s) {
if (_matcher == null ||_matcher.matches(e, matchState)) {
return true;
} else {
@@ -347,7 +347,7 @@ class _ReturnsNormally extends BaseMatcher {
try {
f();
return true;
- } catch (final e, final s) {
+ } catch (e, s) {
matchState.state = {
'exception' : e,
'stack': s
@@ -538,7 +538,7 @@ class _HasLength extends BaseMatcher {
return mismatchDescription.add(' with length of ').
addDescriptionOf(item.length);
}
- } catch (var e) {
+ } catch (e) {
return mismatchDescription.add(' has no length property');
}
}
« no previous file with comments | « pkg/intl/lib/date_format_field.dart ('k') | pkg/unittest/vm_config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698