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)
1448
Should.Throw<
CommandLineSwitchException
>(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue"));
1483
CommandLineSwitchException
exception = null;
1490
catch (
CommandLineSwitchException
e)
1607
catch (
CommandLineSwitchException
e)
XMake_Tests.cs (5)
652
Should.Throw<
CommandLineSwitchException
>(() =>
675
Should.Throw<
CommandLineSwitchException
>(() =>
684
Should.Throw<
CommandLineSwitchException
>(() =>
693
Should.Throw<
CommandLineSwitchException
>(() =>
702
Should.Throw<
CommandLineSwitchException
>(() =>
MSBuild (27)
CommandLineSwitches.cs (1)
891
CommandLineSwitchException
.Throw("SwitchErrorWithArguments", _badCommandLineArg, ResourceUtilities.GetResourceString(_errorMessage), _commandLine, StringBuilderCache.GetStringAndRelease(sb));
XMake.cs (26)
830
CommandLineSwitchException
.Throw("SolutionBuildInvalidForCommandLineEvaluation",
951
catch (
CommandLineSwitchException
e)
3016
CommandLineSwitchException
.Throw("InvalidTerminalLoggerValue", terminalLoggerArg);
3127
CommandLineSwitchException
.Throw("InvalidIsolateProjectsValue", parameter);
3158
CommandLineSwitchException
.Throw("InvalidGraphBuildValue", parameter);
3207
CommandLineSwitchException
.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message);
3211
CommandLineSwitchException
.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message);
3239
CommandLineSwitchException
.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message);
3258
CommandLineSwitchException
.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message);
3321
CommandLineSwitchException
.Throw(resourceName, parameters[parameters.Length - 1], ex.Message);
3325
CommandLineSwitchException
.Throw(resourceName, parameters[parameters.Length - 1], ex.Message);
3364
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
3369
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
3374
CommandLineSwitchException
.Throw("InvalidProfilerValue", parameters[parameters.Length - 1],
3401
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", input[0], ex.Message);
3405
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", input[0], ex.Message);
3408
CommandLineSwitchException
.VerifyThrow(nodeModeNumber >= 0, "InvalidNodeNumberValueIsNegative", input[0]);
3467
CommandLineSwitchException
.Throw("InvalidNodeNumberValue", nodeModeNumber.ToString());
3501
CommandLineSwitchException
.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message);
3505
CommandLineSwitchException
.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message);
3508
CommandLineSwitchException
.VerifyThrow(cpuCount > 0 && cpuCount <= 1024, "InvalidMaxCPUCountValueOutsideRange", parameters[parameters.Length - 1]);
3729
CommandLineSwitchException
.Throw("NameInvalid", nameof(XMakeElements.target), parameter, parameter[indexOfSpecialCharacter].ToString());
3777
CommandLineSwitchException
.VerifyThrow((parameterSections[0].Length > 0) && (parameterSections.Length == 2),
4243
CommandLineSwitchException
.Throw("InvalidVerbosityError", value);
4331
CommandLineSwitchException
.VerifyThrow(loggerSpec[0].Length > 0,
4368
CommandLineSwitchException
.VerifyThrow(loggerAssemblySpec.Length > 0,