Skip to content

Commit

Permalink
update ArgParserException class to override the toString() method
Browse files Browse the repository at this point in the history
Signed-off-by: ふぁ <yuki@yuki0311.com>
  • Loading branch information
fa0311 committed Sep 26, 2024
1 parent 0c7568c commit d1c1481
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/arg_parser_exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ class ArgParserException extends FormatException {
ArgParserException(super.message,
[Iterable<String>? commands, this.arg, super.source, super.offset])
: commands = commands == null ? const [] : List.unmodifiable(commands);

/// Returns a string representation of this exception.
@override
String toString() {
return 'FormatException: $message';
}
}

0 comments on commit d1c1481

Please sign in to comment.