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)
1450
Should.Throw<
CommandLineSwitchException
>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue"));
1485
CommandLineSwitchException
exception = null;
1492
catch (
CommandLineSwitchException
e)
1609
catch (
CommandLineSwitchException
e)
XMake_Tests.cs (5)
651
Should.Throw<
CommandLineSwitchException
>(() =>
674
Should.Throw<
CommandLineSwitchException
>(() =>
683
Should.Throw<
CommandLineSwitchException
>(() =>
692
Should.Throw<
CommandLineSwitchException
>(() =>
701
Should.Throw<
CommandLineSwitchException
>(() =>
MSBuild (27)
CommandLineSwitches.cs (1)
892
CommandLineSwitchException
.Throw("SwitchErrorWithArguments", _badCommandLineArg, ResourceUtilities.GetResourceString(_errorMessage), _commandLine, StringBuilderCache.GetStringAndRelease(sb));
XMake.cs (26)
827
CommandLineSwitchException
.Throw("SolutionBuildInvalidForCommandLineEvaluation",
945
catch (
CommandLineSwitchException
e)
3004
CommandLineSwitchException
.Throw("InvalidTerminalLoggerValue", terminalLoggerArg);
3115
CommandLineSwitchException
.Throw("InvalidIsolateProjectsValue", parameter);
3146
CommandLineSwitchException
.Throw("InvalidGraphBuildValue", parameter);
3195
CommandLineSwitchException
.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message);
3199
CommandLineSwitchException
.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message);
3227
CommandLineSwitchException
.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message);
3246
CommandLineSwitchException
.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message);
3309
CommandLineSwitchException
.Throw(resourceName, parameters[parameters.Length - 1], ex.Message);
3313
CommandLineSwitchException
.Throw(resourceName, parameters[parameters.Length - 1], ex.Message);
3352
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
3357
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
3362
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
3389
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", input[0], ex.Message);
3393
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", input[0], ex.Message);
3396
CommandLineSwitchException
.VerifyThrow(nodeModeNumber >= 0, "InvalidNodeNumberValueIsNegative", input[0]);
3455
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", nodeModeNumber.ToString());
3489
CommandLineSwitchException
.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message);
3493
CommandLineSwitchException
.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message);
3496
CommandLineSwitchException
.VerifyThrow(cpuCount > 0 && cpuCount <= 1024, "InvalidMaxCPUCountValueOutsideRange", parameters[parameters.Length - 1]);
3717
CommandLineSwitchException
.Throw("NameInvalid", nameof(XMakeElements.target), parameter, parameter[indexOfSpecialCharacter].ToString());
3770
CommandLineSwitchException
.VerifyThrow((parameterSections[0].Length > 0) && (parameterSections.Length == 2),
4219
CommandLineSwitchException
.Throw("InvalidVerbosityError", value);
4307
CommandLineSwitchException
.VerifyThrow(loggerSpec[0].Length > 0,
4344
CommandLineSwitchException
.VerifyThrow(loggerAssemblySpec.Length > 0,