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

Unified Diff: lib/args/args.dart

Issue 10850034: Rename BadNumberFormatException -> FormatException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. 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 | « corelib/unified/math/base.dart ('k') | lib/compiler/implementation/lib/interceptors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/args/args.dart
diff --git a/lib/args/args.dart b/lib/args/args.dart
index f6cd77b30e0df2153e3a3f6b79e5369e7c7a5eb1..9bd34dc925721cd0c5d9e6881090cabc7b788211 100644
--- a/lib/args/args.dart
+++ b/lib/args/args.dart
@@ -41,8 +41,8 @@
* must be a [bool].
*
* To validate non-flag options, you may provide an allowed set of values. When
- * you do, it will throw an [ArgFormatException] when you parse the arguments
- * if the value for an option is not in the allowed set:
+ * you do, it will throw a [FormatException] when you parse the arguments if
+ * the value for an option is not in the allowed set:
*
* parser.addOption('mode', allowed: ['debug', 'release']);
*
@@ -300,11 +300,11 @@ class ArgParser {
}
/**
- * Called during parsing to validate the arguments. Throws an
- * [ArgFormatException] if [condition] is `false`.
+ * Called during parsing to validate the arguments. Throws a
+ * [FormatException] if [condition] is `false`.
*/
_validate(bool condition, String message) {
- if (!condition) throw new ArgFormatException(message);
+ if (!condition) throw new FormatException(message);
}
/** Validates and stores [value] as the value for [option]. */
@@ -487,14 +487,6 @@ class ArgResults {
}
}
-/**
- * Exception thrown by [ArgParser.parse()] when the argument list isn't valid.
- */
-class ArgFormatException implements Exception {
- final String message;
- const ArgFormatException(this.message);
-}
-
class _Option {
final String name;
final String abbreviation;
« no previous file with comments | « corelib/unified/math/base.dart ('k') | lib/compiler/implementation/lib/interceptors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698