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)
1490
Should.Throw<
CommandLineSwitchException
>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue"));
1527
Should.Throw<
CommandLineSwitchException
>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidNoLogoValue"));
1562
CommandLineSwitchException
exception = null;
1569
catch (
CommandLineSwitchException
e)
1682
catch (
CommandLineSwitchException
e)
XMake_Tests.cs (9)
660
Should.Throw<
CommandLineSwitchException
>(() =>
683
Should.Throw<
CommandLineSwitchException
>(() =>
692
Should.Throw<
CommandLineSwitchException
>(() =>
701
Should.Throw<
CommandLineSwitchException
>(() =>
733
Should.Throw<
CommandLineSwitchException
>(() =>
742
Should.Throw<
CommandLineSwitchException
>(() =>
751
Should.Throw<
CommandLineSwitchException
>(() =>
760
Should.Throw<
CommandLineSwitchException
>(() =>
769
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,