1 instantiation of CommandLineSwitchException
MSBuild (1)
CommandLine\CommandLineSwitchException.cs (1)
154
throw new
CommandLineSwitchException
(errorMessage, commandLineArg);
40 references to CommandLineSwitchException
Microsoft.Build.CommandLine.UnitTests (15)
CommandLineParserTests.cs (1)
32
Should.Throw<
CommandLineSwitchException
>(() =>
CommandLineSwitches_Tests.cs (5)
1491
Should.Throw<
CommandLineSwitchException
>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue"));
1528
Should.Throw<
CommandLineSwitchException
>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidNoLogoValue"));
1563
CommandLineSwitchException
exception = null;
1570
catch (
CommandLineSwitchException
e)
1683
catch (
CommandLineSwitchException
e)
XMake_Tests.cs (9)
658
Should.Throw<
CommandLineSwitchException
>(() =>
681
Should.Throw<
CommandLineSwitchException
>(() =>
690
Should.Throw<
CommandLineSwitchException
>(() =>
699
Should.Throw<
CommandLineSwitchException
>(() =>
731
Should.Throw<
CommandLineSwitchException
>(() =>
740
Should.Throw<
CommandLineSwitchException
>(() =>
749
Should.Throw<
CommandLineSwitchException
>(() =>
758
Should.Throw<
CommandLineSwitchException
>(() =>
767
Should.Throw<
CommandLineSwitchException
>(() =>
MSBuild (25)
CommandLine\CommandLineSwitches.cs (1)
899
CommandLineSwitchException
.Throw("SwitchErrorWithArguments", _badCommandLineArg, ResourceUtilities.GetResourceString(_errorMessage), _commandLine, StringBuilderCache.GetStringAndRelease(sb));
XMake.cs (24)
815
CommandLineSwitchException
.Throw("SolutionBuildInvalidForCommandLineEvaluation",
938
catch (
CommandLineSwitchException
e)
2572
CommandLineSwitchException
.Throw("InvalidTerminalLoggerValue", terminalLoggerArg);
2662
CommandLineSwitchException
.Throw("InvalidIsolateProjectsValue", parameter);
2693
CommandLineSwitchException
.Throw("InvalidGraphBuildValue", parameter);
2768
CommandLineSwitchException
.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message);
2772
CommandLineSwitchException
.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message);
2795
CommandLineSwitchException
.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message);
2814
CommandLineSwitchException
.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message);
2877
CommandLineSwitchException
.Throw(resourceName, parameters[parameters.Length - 1], ex.Message);
2881
CommandLineSwitchException
.Throw(resourceName, parameters[parameters.Length - 1], ex.Message);
2920
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
2925
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
2930
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
2949
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", value);
3039
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", nodeMode.ToString());
3074
CommandLineSwitchException
.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message);
3078
CommandLineSwitchException
.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message);
3081
CommandLineSwitchException
.VerifyThrow(cpuCount > 0 && cpuCount <= 1024, "InvalidMaxCPUCountValueOutsideRange", parameters[parameters.Length - 1]);
3262
CommandLineSwitchException
.Throw("NameInvalid", nameof(XMakeElements.target), parameter, parameter[indexOfSpecialCharacter].ToString());
3310
CommandLineSwitchException
.VerifyThrow((parameterSections[0].Length > 0) && (parameterSections.Length == 2),
3816
CommandLineSwitchException
.Throw("InvalidVerbosityError", value);
3904
CommandLineSwitchException
.VerifyThrow(loggerSpec[0].Length > 0,
3941
CommandLineSwitchException
.VerifyThrow(loggerAssemblySpec.Length > 0,