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)
1629
catch (
CommandLineSwitchException
e)
XMake_Tests.cs (5)
686
Should.Throw<
CommandLineSwitchException
>(() =>
709
Should.Throw<
CommandLineSwitchException
>(() =>
718
Should.Throw<
CommandLineSwitchException
>(() =>
727
Should.Throw<
CommandLineSwitchException
>(() =>
736
Should.Throw<
CommandLineSwitchException
>(() =>
MSBuild (27)
CommandLineSwitches.cs (1)
893
CommandLineSwitchException
.Throw("SwitchErrorWithArguments", _badCommandLineArg, ResourceUtilities.GetResourceString(_errorMessage), _commandLine, StringBuilderCache.GetStringAndRelease(sb));
XMake.cs (26)
748
CommandLineSwitchException
.Throw("SolutionBuildInvalidForCommandLineEvaluation",
871
catch (
CommandLineSwitchException
e)
2948
CommandLineSwitchException
.Throw("InvalidTerminalLoggerValue", terminalLoggerArg);
3091
CommandLineSwitchException
.Throw("InvalidIsolateProjectsValue", parameter);
3122
CommandLineSwitchException
.Throw("InvalidGraphBuildValue", parameter);
3171
CommandLineSwitchException
.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message);
3175
CommandLineSwitchException
.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message);
3203
CommandLineSwitchException
.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message);
3222
CommandLineSwitchException
.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message);
3285
CommandLineSwitchException
.Throw(resourceName, parameters[parameters.Length - 1], ex.Message);
3289
CommandLineSwitchException
.Throw(resourceName, parameters[parameters.Length - 1], ex.Message);
3328
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
3333
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
3338
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
3365
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", input[0], ex.Message);
3369
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", input[0], ex.Message);
3372
CommandLineSwitchException
.VerifyThrow(nodeModeNumber >= 0, "InvalidNodeNumberValueIsNegative", input[0]);
3445
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", nodeModeNumber.ToString());
3479
CommandLineSwitchException
.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message);
3483
CommandLineSwitchException
.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message);
3486
CommandLineSwitchException
.VerifyThrow(cpuCount > 0 && cpuCount <= 1024, "InvalidMaxCPUCountValueOutsideRange", parameters[parameters.Length - 1]);
3707
CommandLineSwitchException
.Throw("NameInvalid", nameof(XMakeElements.target), parameter, parameter[indexOfSpecialCharacter].ToString());
3755
CommandLineSwitchException
.VerifyThrow((parameterSections[0].Length > 0) && (parameterSections.Length == 2),
4237
CommandLineSwitchException
.Throw("InvalidVerbosityError", value);
4325
CommandLineSwitchException
.VerifyThrow(loggerSpec[0].Length > 0,
4362
CommandLineSwitchException
.VerifyThrow(loggerAssemblySpec.Length > 0,