include HelpText in CommandParsingError, write it to stdout

This commit is contained in:
Jon Sequeira 2017-03-14 12:26:24 -07:00
parent 22fb17422f
commit 35732fc07d
4 changed files with 20 additions and 7 deletions

View file

@ -10,8 +10,11 @@ namespace Microsoft.DotNet.Cli.CommandLine
{
private readonly bool _isRequireSubCommandMissing;
public CommandParsingException(string message) : base(message)
public CommandParsingException(
string message,
string helpText = null) : base(message)
{
HelpText = helpText ?? "";
Data.Add("CLI_User_Displayed_Exception", true);
}
@ -27,6 +30,8 @@ namespace Microsoft.DotNet.Cli.CommandLine
public CommandLineApplication Command { get; }
public string HelpText { get; } = "";
public override string Message
{
get