1 instantiation of CommandLineSwitchException
MSBuild (1)
CommandLineSwitchException.cs (1)
154
throw new
CommandLineSwitchException
(errorMessage, commandLineArg);
36 references to CommandLineSwitchException
Microsoft.Build.CommandLine.UnitTests (9)
CommandLineSwitches_Tests.cs (4)
1474
Should.Throw<
CommandLineSwitchException
>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue"));
1509
CommandLineSwitchException
exception = null;
1516
catch (
CommandLineSwitchException
e)
1633
catch (
CommandLineSwitchException
e)
XMake_Tests.cs (5)
697
Should.Throw<
CommandLineSwitchException
>(() =>
720
Should.Throw<
CommandLineSwitchException
>(() =>
729
Should.Throw<
CommandLineSwitchException
>(() =>
738
Should.Throw<
CommandLineSwitchException
>(() =>
747
Should.Throw<
CommandLineSwitchException
>(() =>
MSBuild (27)
CommandLineSwitches.cs (1)
893
CommandLineSwitchException
.Throw("SwitchErrorWithArguments", _badCommandLineArg, ResourceUtilities.GetResourceString(_errorMessage), _commandLine, StringBuilderCache.GetStringAndRelease(sb));
XMake.cs (26)
810
CommandLineSwitchException
.Throw("SolutionBuildInvalidForCommandLineEvaluation",
933
catch (
CommandLineSwitchException
e)
3042
CommandLineSwitchException
.Throw("InvalidTerminalLoggerValue", terminalLoggerArg);
3185
CommandLineSwitchException
.Throw("InvalidIsolateProjectsValue", parameter);
3216
CommandLineSwitchException
.Throw("InvalidGraphBuildValue", parameter);
3265
CommandLineSwitchException
.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message);
3269
CommandLineSwitchException
.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message);
3297
CommandLineSwitchException
.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message);
3316
CommandLineSwitchException
.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message);
3379
CommandLineSwitchException
.Throw(resourceName, parameters[parameters.Length - 1], ex.Message);
3383
CommandLineSwitchException
.Throw(resourceName, parameters[parameters.Length - 1], ex.Message);
3422
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
3427
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
3432
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
3459
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", input[0], ex.Message);
3463
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", input[0], ex.Message);
3466
CommandLineSwitchException
.VerifyThrow(nodeModeNumber >= 0, "InvalidNodeNumberValueIsNegative", input[0]);
3539
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", nodeModeNumber.ToString());
3573
CommandLineSwitchException
.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message);
3577
CommandLineSwitchException
.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message);
3580
CommandLineSwitchException
.VerifyThrow(cpuCount > 0 && cpuCount <= 1024, "InvalidMaxCPUCountValueOutsideRange", parameters[parameters.Length - 1]);
3801
CommandLineSwitchException
.Throw("NameInvalid", nameof(XMakeElements.target), parameter, parameter[indexOfSpecialCharacter].ToString());
3849
CommandLineSwitchException
.VerifyThrow((parameterSections[0].Length > 0) && (parameterSections.Length == 2),
4331
CommandLineSwitchException
.Throw("InvalidVerbosityError", value);
4419
CommandLineSwitchException
.VerifyThrow(loggerSpec[0].Length > 0,
4456
CommandLineSwitchException
.VerifyThrow(loggerAssemblySpec.Length > 0,