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)
2584
CommandLineSwitchException
.Throw("InvalidTerminalLoggerValue", terminalLoggerArg);
2675
CommandLineSwitchException
.Throw("InvalidIsolateProjectsValue", parameter);
2706
CommandLineSwitchException
.Throw("InvalidGraphBuildValue", parameter);
2781
CommandLineSwitchException
.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message);
2785
CommandLineSwitchException
.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message);
2808
CommandLineSwitchException
.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message);
2827
CommandLineSwitchException
.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message);
2890
CommandLineSwitchException
.Throw(resourceName, parameters[parameters.Length - 1], ex.Message);
2894
CommandLineSwitchException
.Throw(resourceName, parameters[parameters.Length - 1], ex.Message);
2933
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
2938
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
2943
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
2962
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", value);
3052
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", nodeMode.ToString());
3087
CommandLineSwitchException
.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message);
3091
CommandLineSwitchException
.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message);
3094
CommandLineSwitchException
.VerifyThrow(cpuCount > 0 && cpuCount <= 1024, "InvalidMaxCPUCountValueOutsideRange", parameters[parameters.Length - 1]);
3275
CommandLineSwitchException
.Throw("NameInvalid", nameof(XMakeElements.target), parameter, parameter[indexOfSpecialCharacter].ToString());
3323
CommandLineSwitchException
.VerifyThrow((parameterSections[0].Length > 0) && (parameterSections.Length == 2),
3829
CommandLineSwitchException
.Throw("InvalidVerbosityError", value);
3917
CommandLineSwitchException
.VerifyThrow(loggerSpec[0].Length > 0,
3954
CommandLineSwitchException
.VerifyThrow(loggerAssemblySpec.Length > 0,