Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Commit 2f9fb5e

Browse files
committed
update ArgParserException class to override the toString() method
Signed-off-by: ふぁ <[email protected]>
1 parent 1990187 commit 2f9fb5e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/src/arg_parser_exception.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,10 @@ class ArgParserException extends FormatException {
1919
super.source,
2020
super.offset])
2121
: commands = commands == null ? const [] : List.unmodifiable(commands);
22+
23+
/// Returns a string representation of this exception.
24+
@override
25+
String toString() {
26+
return 'FormatException: $message';
27+
}
2228
}

0 commit comments

Comments
 (0)