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; |