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

Side by Side Diff: lib/compiler/implementation/warnings.dart

Issue 11049023: [dart2js] Report an error if throw is used outside of catch expression without an argument. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class MessageKind { 5 class MessageKind {
6 final String template; 6 final String template;
7 const MessageKind(this.template); 7 const MessageKind(this.template);
8 8
9 static const GENERIC = const MessageKind('#{1}'); 9 static const GENERIC = const MessageKind('#{1}');
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 static const EMPTY_CATCH_DECLARATION = const MessageKind( 109 static const EMPTY_CATCH_DECLARATION = const MessageKind(
110 'expected an identifier in catch declaration'); 110 'expected an identifier in catch declaration');
111 static const EXTRA_CATCH_DECLARATION = const MessageKind( 111 static const EXTRA_CATCH_DECLARATION = const MessageKind(
112 'extra parameter in catch declaration'); 112 'extra parameter in catch declaration');
113 static const PARAMETER_WITH_TYPE_IN_CATCH = const MessageKind( 113 static const PARAMETER_WITH_TYPE_IN_CATCH = const MessageKind(
114 'cannot use type annotations in catch'); 114 'cannot use type annotations in catch');
115 static const PARAMETER_WITH_MODIFIER_IN_CATCH = const MessageKind( 115 static const PARAMETER_WITH_MODIFIER_IN_CATCH = const MessageKind(
116 'cannot use modifiers in catch'); 116 'cannot use modifiers in catch');
117 static const OPTIONAL_PARAMETER_IN_CATCH = const MessageKind( 117 static const OPTIONAL_PARAMETER_IN_CATCH = const MessageKind(
118 'cannot use optional parameters in catch'); 118 'cannot use optional parameters in catch');
119 static const THROW_WITHOUT_EXPRESSION = const MessageKind(
120 'cannot throw without expression outside of catch block');
ahe 2012/10/03 09:57:39 How about: 'cannot use re-throw outside of catch
Roman 2012/10/03 10:07:34 Done.
119 static const UNBOUND_LABEL = const MessageKind( 121 static const UNBOUND_LABEL = const MessageKind(
120 'cannot resolve label #{1}'); 122 'cannot resolve label #{1}');
121 static const NO_BREAK_TARGET = const MessageKind( 123 static const NO_BREAK_TARGET = const MessageKind(
122 'break statement not inside switch or loop'); 124 'break statement not inside switch or loop');
123 static const NO_CONTINUE_TARGET = const MessageKind( 125 static const NO_CONTINUE_TARGET = const MessageKind(
124 'continue statement not inside loop'); 126 'continue statement not inside loop');
125 static const EXISTING_LABEL = const MessageKind( 127 static const EXISTING_LABEL = const MessageKind(
126 'original declaration of duplicate label #{1}'); 128 'original declaration of duplicate label #{1}');
127 static const DUPLICATE_LABEL = const MessageKind( 129 static const DUPLICATE_LABEL = const MessageKind(
128 'duplicate declaration of label #{1}'); 130 'duplicate declaration of label #{1}');
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 353
352 class CompileTimeConstantError extends Diagnostic { 354 class CompileTimeConstantError extends Diagnostic {
353 CompileTimeConstantError(MessageKind kind, List arguments) 355 CompileTimeConstantError(MessageKind kind, List arguments)
354 : super(kind, arguments); 356 : super(kind, arguments);
355 } 357 }
356 358
357 class CompilationError extends Diagnostic { 359 class CompilationError extends Diagnostic {
358 CompilationError(MessageKind kind, List arguments) 360 CompilationError(MessageKind kind, List arguments)
359 : super(kind, arguments); 361 : super(kind, arguments);
360 } 362 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698