Skip to content

Commit

Permalink
Fix color in validation exception message. Delete IgnoreAttribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
rstarkov committed Oct 9, 2024
1 parent 9ec3666 commit 686ba42
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions Src/Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ public sealed class IsMandatoryAttribute() : Attribute
{
}

/// <summary>Specifies that the command-line parser should ignore a field.</summary>
[AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
public sealed class IgnoreAttribute : Attribute
{
/// <summary>Constructor.</summary>
public IgnoreAttribute() { }
}

/// <summary>
/// Specifies that a field of an enum type should be interpreted as multiple possible options, each specified by an <see
/// cref="OptionAttribute"/> on the enum values in the enum type.</summary>
Expand Down
2 changes: 1 addition & 1 deletion Src/CommandLineParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ private static object parseCommandLine(string[] args, Type type, int i, Func<Con
}
catch (CommandLineValidationException exc) when (exc.GenerateHelpFunc == null)
{
throw new CommandLineValidationException(exc.Message, getHelpGenerator(type, helpProcessor));
throw new CommandLineValidationException(exc.ColoredMessage, getHelpGenerator(type, helpProcessor));
}

return ret;
Expand Down

0 comments on commit 686ba42

Please sign in to comment.