65 references to VerifyThrow
MSBuild (65)
AssemblyLoadInfo.cs (4)
27ErrorUtilities.VerifyThrow((!string.IsNullOrEmpty(assemblyName)) || (!string.IsNullOrEmpty(assemblyFile)), 29ErrorUtilities.VerifyThrow((assemblyName == null) || (assemblyFile == null), 102ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only"); 179ErrorUtilities.VerifyThrow(Path.IsPathRooted(assemblyFile), "Assembly file path should be rooted");
AssemblyNameExtension.cs (3)
327ErrorUtilities.VerifyThrow(!immutable, "Object is immutable cannot replace the version"); 384ErrorUtilities.VerifyThrow(extensionToAdd.Immutable, "ExtensionToAdd is not immutable"); 515ErrorUtilities.VerifyThrow(result == baselineResult, "Optimized version of CompareBaseNameTo didn't return the same result as the baseline.");
CommandLineSwitchException.cs (1)
152ErrorUtilities.VerifyThrow(errorMessage != null, "The resource string must exist.");
CommunicationsUtilities.cs (3)
463ErrorUtilities.VerifyThrow(bytes.Length == 4, "Int should be 4 bytes"); 624ErrorUtilities.VerifyThrow(taskHostParameters.TryGetValue(XMakeAttributes.runtime, out string runtimeVersion), "Should always have an explicit runtime when we call this method."); 625ErrorUtilities.VerifyThrow(taskHostParameters.TryGetValue(XMakeAttributes.architecture, out string architecture), "Should always have an explicit architecture when we call this method.");
FileUtilities.cs (2)
393ErrorUtilities.VerifyThrow(trailingSegmentsToKeep >= 0, "trailing segments must be positive"); 1144ErrorUtilities.VerifyThrow(splitPath.Length > 0, "Cannot call MakeRelative on a path of only slashes.");
InitializationException.cs (3)
145ErrorUtilities.VerifyThrow(errorMessage != null, "The resource string must exist."); 169ErrorUtilities.VerifyThrow(errorMessage != null, "The resource string must exist."); 186ErrorUtilities.VerifyThrow(message != null, "The string must exist.");
JsonOutputFormatter.cs (4)
35ErrorUtilities.VerifyThrow(_topLevelNode["Properties"] is null, "Should not add multiple lists of properties to the json format."); 53ErrorUtilities.VerifyThrow(_topLevelNode["Items"] is null, "Should not add multiple lists of items to the json format."); 89ErrorUtilities.VerifyThrow(_topLevelNode["Items"] is null, "Should not add multiple lists of items to the json format."); 130ErrorUtilities.VerifyThrow(_topLevelNode["TargetResults"] is null, "Should not add multiple lists of target results to the json format.");
LoadedType.cs (3)
32ErrorUtilities.VerifyThrow(type != null, "We must have the type."); 33ErrorUtilities.VerifyThrow(assemblyLoadInfo != null, "We must have the assembly the type was loaded from."); 34ErrorUtilities.VerifyThrow(loadedAssembly is not null, "The assembly should always be loaded even if only by MetadataLoadContext.");
LogMessagePacketBase.cs (1)
327ErrorUtilities.VerifyThrow(nodeBuildEvent != null, "nodeBuildEvent was null");
Modifiers.cs (5)
385ErrorUtilities.VerifyThrow(itemSpec != null, "Need item-spec to modify."); 386ErrorUtilities.VerifyThrow(modifier != null, "Need modifier to apply to item-spec."); 417ErrorUtilities.VerifyThrow(FileUtilitiesRegex.StartsWithUncPattern(modifiedItemSpec), 478ErrorUtilities.VerifyThrow((modifiedItemSpec.Length > length) && IsSlash(modifiedItemSpec[length]), 486ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(modifiedItemSpec) && IsSlash(modifiedItemSpec[0]),
NodeEndpointOutOfProcBase.cs (3)
296ErrorUtilities.VerifyThrow(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread."); 318ErrorUtilities.VerifyThrow(_packetQueue != null, "packetQueue is null"); 319ErrorUtilities.VerifyThrow(_packetAvailable != null, "packetAvailable is null");
OutOfProcTaskHostNode.cs (11)
217ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!"); 229ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!"); 241ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!"); 253ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!"); 539ErrorUtilities.VerifyThrow(_taskHost._currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!"); 722ErrorUtilities.VerifyThrow(!_isTaskExecuting, "Why are we getting a TaskHostConfiguration packet while we're still executing a task?"); 736ErrorUtilities.VerifyThrow(!_isTaskExecuting, "The task should be done executing before CompleteTask."); 798ErrorUtilities.VerifyThrow(!_isTaskExecuting, "We should never have a task in the process of executing when we receive NodeBuildComplete."); 1207ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration when we're trying to log messages!"); 1224ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration when we're trying to log warnings!"); 1247ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration when we're trying to log errors!");
OutOfProcTaskHostTaskResult.cs (2)
70ErrorUtilities.VerifyThrow( 79ErrorUtilities.VerifyThrow(exceptionMessage != null, "If we have message args, we need a message.");
QuotingUtilities.cs (2)
72ErrorUtilities.VerifyThrow(maxSplits >= 2, "There is no point calling this method for less than two splits."); 76ErrorUtilities.VerifyThrow(separators.IndexOf('"') == -1, "The double-quote character is not supported as a separator.");
TaskParameter.cs (2)
396ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "Cannot call this method when reading!"); 463ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.ReadFromStream, "Cannot call this method when writing!");
TempFileUtilities.cs (1)
188ErrorUtilities.VerifyThrow(!FileSystems.Default.FileExists(file), "Guid should be unique");
TypeLoader.cs (1)
70ErrorUtilities.VerifyThrow(isDesiredType != null, "need a type filter");
XMake.cs (10)
1689ErrorUtilities.VerifyThrow(ex.HasBeenLogged, "Should have been logged"); 2152ErrorUtilities.VerifyThrow(switchName == unquotedSwitchIndicatorAndName.Substring(switchIndicatorsLength), 2155ErrorUtilities.VerifyThrow(doubleQuotesRemovedFromArg >= doubleQuotesRemovedFromSwitchIndicatorAndName, 2184ErrorUtilities.VerifyThrow(switchParameters != null, "We must be able to extract the switch parameters."); 2802ErrorUtilities.VerifyThrow(!invokeBuild || !string.IsNullOrEmpty(projectFile), "We should have a project file if we're going to build."); 3027ErrorUtilities.VerifyThrow(projectSwitchParameters.Length <= 1, "Expect exactly one project at a time."); 3514ErrorUtilities.VerifyThrow(parameters.Length <= 1, "Expect exactly one project at a time."); 4257ErrorUtilities.VerifyThrow((loggerSpec.Count >= 1) && (loggerSpec.Count <= 2), 4303ErrorUtilities.VerifyThrow((loggerSpec.Count >= 1) && (loggerSpec.Count <= 2), 4319ErrorUtilities.VerifyThrow(loggerTypeSpec.Count >= 1, "SplitUnquoted() must return at least one string");
XMakeAttributes.cs (4)
170ErrorUtilities.VerifyThrow(runtimeA != String.Empty && runtimeB != String.Empty, "We should never get an empty string passed to this method"); 214ErrorUtilities.VerifyThrow(runtimeA != String.Empty && runtimeB != String.Empty, "We should never get an empty string passed to this method"); 287ErrorUtilities.VerifyThrow(architectureA != String.Empty && architectureB != String.Empty, "We should never get an empty string passed to this method"); 354ErrorUtilities.VerifyThrow(architectureA != String.Empty && architectureB != String.Empty, "We should never get an empty string passed to this method");