trigger help display using HelpException

This commit is contained in:
Jon Sequeira 2017-03-09 12:31:34 -08:00
parent ea308e9b59
commit 46b799af01
6 changed files with 58 additions and 10 deletions

View file

@ -77,6 +77,11 @@ namespace Microsoft.DotNet.Cli
return ProcessArgs(args);
}
}
catch (HelpException e)
{
Reporter.Output.Write(e.Message);
return e.IsError ? 1 : 0;
}
catch (Exception e) when (e.ShouldBeDisplayedAsError())
{
Reporter.Error.WriteLine(CommandContext.IsVerbose() ?