61 references to VerifyThrow
Microsoft.Build.Tasks.Core (56)
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
130
ErrorUtilities.
VerifyThrow
(FileSystems.Default.FileExists(_assemblyFolderConfigFile),
AssemblyDependency\GenerateBindingRedirects.cs (2)
195
ErrorUtilities.
VerifyThrow
(runtimeNode != null, "This should not be called if the \"runtime\" node is missing.");
361
ErrorUtilities.
VerifyThrow
(SuggestedRedirects?.Length > 0, "This should not be called if there is no suggested redirect.");
AssemblyDependency\GlobalAssemblyCache.cs (1)
60
ErrorUtilities.
VerifyThrow
(assemblyName.FullName != null, "Got a null assembly name fullname.");
AssemblyDependency\Reference.cs (4)
621
ErrorUtilities.
VerifyThrow
(
623
ErrorUtilities.
VerifyThrow
(
747
ErrorUtilities.
VerifyThrow
(remappedFrom.Immutable, " Remapped from is NOT immutable");
748
ErrorUtilities.
VerifyThrow
(remappedTo.Immutable, " Remapped to is NOT immutable");
AssemblyDependency\ReferenceTable.cs (6)
423
ErrorUtilities.
VerifyThrow
(assemblyName.Name != null, "Got an empty assembly name.");
448
ErrorUtilities.
VerifyThrow
(assemblyName.Name != null, "Got an empty assembly name.");
1673
ErrorUtilities.
VerifyThrow
(dependencyIterations < maxIterations, "Maximum iterations exceeded while looking for dependencies.");
1692
ErrorUtilities.
VerifyThrow
(moreResolvableIterations < maxIterations, "Maximum iterations exceeded while looking for resolvable references.");
2348
ErrorUtilities.
VerifyThrow
(assemblyReference0.assemblyName.FullName != null, "Got a null assembly name fullname. (0)");
2349
ErrorUtilities.
VerifyThrow
(assemblyReference1.assemblyName.FullName != null, "Got a null assembly name fullname. (1)");
AssemblyNameExtension.cs (3)
327
ErrorUtilities.
VerifyThrow
(!immutable, "Object is immutable cannot replace the version");
384
ErrorUtilities.
VerifyThrow
(extensionToAdd.Immutable, "ExtensionToAdd is not immutable");
515
ErrorUtilities.
VerifyThrow
(result == baselineResult, "Optimized version of CompareBaseNameTo didn't return the same result as the baseline.");
AssemblyRegistrationCache.cs (2)
34
ErrorUtilities.
VerifyThrow
(_assemblies.Count == _typeLibraries.Count, "Internal assembly and type library lists should have the same number of entries in AssemblyRegistrationCache");
53
ErrorUtilities.
VerifyThrow
((index >= 0) && (index < _assemblies.Count), "Invalid index in the call to AssemblyRegistrationCache.GetEntry");
CommandLineBuilderExtension.cs (1)
236
ErrorUtilities.
VerifyThrow
(
ComReference.cs (1)
429
ErrorUtilities.
VerifyThrow
(bufferSize <= int.MaxValue / 2, "Buffer size approaching int.MaxValue");
FileMatcher.cs (4)
841
ErrorUtilities.
VerifyThrow
((recursionState.SearchData.Filespec == null) || (recursionState.SearchData.RegexFileMatch == null),
844
ErrorUtilities.
VerifyThrow
((recursionState.SearchData.Filespec != null) || (recursionState.SearchData.RegexFileMatch != null),
847
ErrorUtilities.
VerifyThrow
(recursionState.RemainingWildcardDirectory != null, "Expected non-null remaning wildcard directory.");
1183
ErrorUtilities.
VerifyThrow
(
FileUtilities.cs (2)
414
ErrorUtilities.
VerifyThrow
(trailingSegmentsToKeep >= 0, "trailing segments must be positive");
1177
ErrorUtilities.
VerifyThrow
(splitPath.Length > 0, "Cannot call MakeRelative on a path of only slashes.");
GenerateResource.cs (6)
811
ErrorUtilities.
VerifyThrow
(processType == typeof(ProcessResourceFiles), "Somehow got a wrong and possibly incompatible type for ProcessResourceFiles.");
1148
ErrorUtilities.
VerifyThrow
(inputsToProcess.Count != 0, "There should be resource files to process");
1149
ErrorUtilities.
VerifyThrow
(inputsToProcess.Count == outputsToProcess.Count, "The number of inputs and outputs should be equal");
1269
ErrorUtilities.
VerifyThrow
(inputsToProcess.Count == 1 && outputsToProcess.Count == 1, "For STR, there should only be one input and one output.");
2102
ErrorUtilities.
VerifyThrow
(OutputResources != null && OutputResources.Length != 0, "Should be at least one output resource");
2186
ErrorUtilities.
VerifyThrow
(_cache != null, "We did not create a cache!");
Modifiers.cs (5)
385
ErrorUtilities.
VerifyThrow
(itemSpec != null, "Need item-spec to modify.");
386
ErrorUtilities.
VerifyThrow
(modifier != null, "Need modifier to apply to item-spec.");
417
ErrorUtilities.
VerifyThrow
(FileUtilitiesRegex.StartsWithUncPattern(modifiedItemSpec),
478
ErrorUtilities.
VerifyThrow
((modifiedItemSpec.Length > length) && IsSlash(modifiedItemSpec[length]),
486
ErrorUtilities.
VerifyThrow
(!string.IsNullOrEmpty(modifiedItemSpec) && IsSlash(modifiedItemSpec[0]),
ReadOnlyCollection.cs (1)
38
ErrorUtilities.
VerifyThrow
(backing != null, "Need backing collection");
ResGen.cs (3)
366
ErrorUtilities.
VerifyThrow
(!IsNullOrEmpty(InputFiles), "If InputFiles is empty, the task should have returned before reaching this point");
405
ErrorUtilities.
VerifyThrow
(!IsNullOrEmpty(InputFiles), "If InputFiles is empty, the task should have returned before reaching this point");
474
ErrorUtilities.
VerifyThrow
(!IsNullOrEmpty(InputFiles), "If InputFiles is empty, the task should have returned before reaching this point");
StreamMappedString.cs (5)
195
ErrorUtilities.
VerifyThrow
(originalPageNumber != _currentPageNumber, "Expected a new page.");
290
ErrorUtilities.
VerifyThrow
(_charactersRead != _pageSize, "Attempt to append to non-last page.");
305
ErrorUtilities.
VerifyThrow
(_priorPage != null, "There is no last character in the stream.");
389
ErrorUtilities.
VerifyThrow
(charactersExtracted > 0, "Expected non-zero extraction count.");
404
ErrorUtilities.
VerifyThrow
(page >= _currentPageNumber - 1 && page <= _currentPageNumber, "Could not get character count for this page.");
TempFileUtilities.cs (1)
188
ErrorUtilities.
VerifyThrow
(!FileSystems.Default.FileExists(file), "Guid should be unique");
tokenCharReader.cs (2)
268
ErrorUtilities.
VerifyThrow
(originalPosition != _position, "Expected position to be incremented.");
275
ErrorUtilities.
VerifyThrow
(originalPosition != _position, "Expected position to be incremented.");
XamlTaskFactory\CommandLineGenerator.cs (1)
46
ErrorUtilities.
VerifyThrow
(success, "Unable to parse specified file or contents.");
XamlTaskFactory\RelationsParser.cs (1)
250
ErrorUtilities.
VerifyThrow
(xmlDocument != null, nameof(xmlDocument));
XMakeAttributes.cs (4)
170
ErrorUtilities.
VerifyThrow
(runtimeA != String.Empty && runtimeB != String.Empty, "We should never get an empty string passed to this method");
214
ErrorUtilities.
VerifyThrow
(runtimeA != String.Empty && runtimeB != String.Empty, "We should never get an empty string passed to this method");
287
ErrorUtilities.
VerifyThrow
(architectureA != String.Empty && architectureB != String.Empty, "We should never get an empty string passed to this method");
354
ErrorUtilities.
VerifyThrow
(architectureA != String.Empty && architectureB != String.Empty, "We should never get an empty string passed to this method");
Microsoft.Build.Tasks.UnitTests (5)
ErrorUtilities_Tests.cs (3)
19
ErrorUtilities.
VerifyThrow
(false, "msbuild rules");
34
ErrorUtilities.
VerifyThrow
(true, "msbuild rules");
41
ErrorUtilities.
VerifyThrow
(true, "blah");
QuotingUtilities.cs (2)
71
ErrorUtilities.
VerifyThrow
(maxSplits >= 2, "There is no point calling this method for less than two splits.");
75
ErrorUtilities.
VerifyThrow
(separators.IndexOf('"') == -1, "The double-quote character is not supported as a separator.");