Complete the refactor and test improvements
This commit is contained in:
parent
82f5278d8a
commit
ae1e183e41
14 changed files with 188 additions and 202 deletions
|
@ -2,11 +2,14 @@
|
|||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.DotNet.Tools;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.CommandLine
|
||||
{
|
||||
internal class CommandParsingException : Exception
|
||||
{
|
||||
private bool _isRequireSubCommandMissing;
|
||||
|
||||
public CommandParsingException(
|
||||
CommandLineApplication command,
|
||||
string message,
|
||||
|
@ -14,10 +17,19 @@ namespace Microsoft.DotNet.Cli.CommandLine
|
|||
: base(message)
|
||||
{
|
||||
Command = command;
|
||||
IsRequireSubCommandMissing = isRequireSubCommandMissing;
|
||||
_isRequireSubCommandMissing = isRequireSubCommandMissing;
|
||||
}
|
||||
|
||||
public CommandLineApplication Command { get; }
|
||||
public bool IsRequireSubCommandMissing { get; }
|
||||
|
||||
public override string Message
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isRequireSubCommandMissing
|
||||
? CommonLocalizableStrings.RequiredCommandNotPassed
|
||||
: base.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue