mayuki / Cocona

Micro-framework for .NET console application. Cocona makes it easy and fast to build console applications on .NET.
MIT License
3.26k stars 85 forks source link

Improve error message when parsing of optional enum option fails #120

Open dlemstra opened 9 months ago

dlemstra commented 9 months ago

When the parsing of an optional parameter that is an enum fails the following error message is printed:

Error: Option 'foo' requires Nullable`1 value. 'bar' cannot be converted to Nullable`1 value.

It would be nice if the Nullable would be removed and the type of the enumeration would be shown instead. The same could be said for int?. Can this error message be improved?