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

Unified Diff: lib/compiler/implementation/warnings.dart

Issue 10917070: Disallow legacy try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Improve testing. Created 8 years, 3 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
Index: lib/compiler/implementation/warnings.dart
diff --git a/lib/compiler/implementation/warnings.dart b/lib/compiler/implementation/warnings.dart
index a4a7ea8ca7edaed2dd10ebf3d7da24250d421554..e511bfe13a53ae55d6dc149e89c009c37f78726d 100644
--- a/lib/compiler/implementation/warnings.dart
+++ b/lib/compiler/implementation/warnings.dart
@@ -103,9 +103,15 @@ class MessageKind {
static const NO_CATCH_NOR_FINALLY = const MessageKind(
"expected 'catch' or 'finally'");
static const EMPTY_CATCH_DECLARATION = const MessageKind(
- 'expected a variable in catch declaration');
+ 'expected an identifier in catch declaration');
static const EXTRA_CATCH_DECLARATION = const MessageKind(
- 'extra variable in catch declaration');
+ 'extra parameter in catch declaration');
+ static const PARAMETER_WITH_TYPE_IN_CATCH = const MessageKind(
+ 'cannot use type annotations in catch');
+ static const PARAMETER_WITH_MODIFIER_IN_CATCH = const MessageKind(
+ 'cannot use modifiers in catch');
+ static const OPTIONAL_PARAMETER_IN_CATCH = const MessageKind(
+ 'cannot use optional parameters in catch');
static const UNBOUND_LABEL = const MessageKind(
'cannot resolve label #{1}');
static const NO_BREAK_TARGET = const MessageKind(

Powered by Google App Engine
This is Rietveld 408576698