display CommandParsingException gracefully (#5493)

* display CommandParsing gracefully

This set of changes handles CommandParsingException gracefuly (so as not to show the user a stack trace) and generalizes graceful exception display somewhat away from being type-specific.

* fix compile error by inlining constant

* remove unused test logging
This commit is contained in:
Jon Sequeira 2017-01-30 14:36:44 -08:00 committed by Piotr Puszkiewicz
parent 5aded80a7b
commit e8c5d23c29
8 changed files with 42 additions and 13 deletions

View file

@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.Tools;
namespace Microsoft.DotNet.Cli.CommandLine
@ -18,6 +19,8 @@ namespace Microsoft.DotNet.Cli.CommandLine
{
Command = command;
_isRequireSubCommandMissing = isRequireSubCommandMissing;
Data.Add("CLI_User_Displayed_Exception", true);
}
public CommandLineApplication Command { get; }