171 references to ErrorUtilities
Microsoft.Build.Tasks.Core (162)
AppConfig\BindingRedirect.cs (4)
40ErrorUtilities.VerifyThrowArgument(!String.IsNullOrEmpty(oldVersion), "AppConfig.BindingRedirectMissingOldVersion"); 61ErrorUtilities.ThrowArgument(e, "AppConfig.InvalidOldVersionAttribute", e.Message); 67ErrorUtilities.VerifyThrowArgument(!String.IsNullOrEmpty(newVersionAttribute), "AppConfig.BindingRedirectMissingNewVersion"); 75ErrorUtilities.ThrowArgument(e, "AppConfig.InvalidNewVersionAttribute", e.Message);
AppConfig\DependentAssembly.cs (1)
99ErrorUtilities.ThrowArgument(e, "AppConfig.InvalidAssemblyIdentityFields");
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
130ErrorUtilities.VerifyThrow(FileSystems.Default.FileExists(_assemblyFolderConfigFile),
AssemblyDependency\AssemblyInformation.cs (1)
74ErrorUtilities.VerifyThrowArgumentNull(sourceFile);
AssemblyDependency\GenerateBindingRedirects.cs (2)
195ErrorUtilities.VerifyThrow(runtimeNode != null, "This should not be called if the \"runtime\" node is missing."); 361ErrorUtilities.VerifyThrow(SuggestedRedirects?.Length > 0, "This should not be called if there is no suggested redirect.");
AssemblyDependency\Reference.cs (4)
621ErrorUtilities.VerifyThrow( 623ErrorUtilities.VerifyThrow( 747ErrorUtilities.VerifyThrow(remappedFrom.Immutable, " Remapped from is NOT immutable"); 748ErrorUtilities.VerifyThrow(remappedTo.Immutable, " Remapped to is NOT immutable");
AssemblyDependency\ReferenceTable.cs (8)
405ErrorUtilities.VerifyThrow(assemblyName.Name != null, "Got an empty assembly name."); 430ErrorUtilities.VerifyThrow(assemblyName.Name != null, "Got an empty assembly name."); 1654ErrorUtilities.VerifyThrow(dependencyIterations < maxIterations, "Maximum iterations exceeded while looking for dependencies."); 1673ErrorUtilities.VerifyThrow(moreResolvableIterations < maxIterations, "Maximum iterations exceeded while looking for resolvable references."); 2338ErrorUtilities.VerifyThrow(assemblyReference0.assemblyName.FullName != null, "Got a null assembly name fullname. (0)"); 2339ErrorUtilities.VerifyThrow(assemblyReference1.assemblyName.FullName != null, "Got a null assembly name fullname. (1)"); 2544ErrorUtilities.VerifyThrowInternalNull(a); 2545ErrorUtilities.VerifyThrowInternalNull(b);
AssemblyDependency\ResolveAssemblyReference.cs (8)
342ErrorUtilities.VerifyThrowArgumentNull(value, "TargetFrameworkSubsets"); 474ErrorUtilities.VerifyThrowArgumentNull(value, "InstalledAssemblySubsetTables"); 505ErrorUtilities.VerifyThrowArgumentNull(value, "FullFrameworkAssemblyTables"); 857ErrorUtilities.VerifyThrowArgumentNull(value, "FullTargetFrameworkSubsetNames"); 875ErrorUtilities.VerifyThrowArgumentNull(value, "profileName"); 894ErrorUtilities.VerifyThrowArgumentNull(value, "FullFrameworkFolders"); 1328ErrorUtilities.VerifyThrowInternalNull(conflictCandidate); 1749ErrorUtilities.VerifyThrowArgumentNull(reference);
AssemblyFoldersFromConfig.cs (2)
32ErrorUtilities.VerifyThrowArgumentNull(configFile); 33ErrorUtilities.VerifyThrowArgumentNull(targetRuntimeVersion);
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.");
AssemblyResources.cs (1)
27ErrorUtilities.VerifyThrow(resource != null, "Missing resource '{0}'", name);
CombinePath.cs (1)
37ErrorUtilities.VerifyThrowArgumentNull(_paths, nameof(Paths));
CommandLineBuilderExtension.cs (1)
236ErrorUtilities.VerifyThrow(
ConversionUtilities.cs (3)
7using Error = Microsoft.Build.Shared.ErrorUtilities; 38Error.ThrowArgument("Shared.CannotConvertStringToBool", parameterValue); 147Error.ThrowInternalError("Cannot numeric evaluate");
ConvertToAbsolutePath.cs (1)
29ErrorUtilities.VerifyThrowArgumentNull(_paths, nameof(Paths));
Copy.cs (1)
627ErrorUtilities.ThrowInternalError("Failed posting a file copy to an ActionBlock. Should not happen with block at max int capacity.");
CreateManifestResourceName.cs (4)
53ErrorUtilities.VerifyThrowArgumentNull(_resourceFiles, nameof(ResourceFiles)); 298ErrorUtilities.VerifyThrowArgumentNull(subName); 336ErrorUtilities.VerifyThrowArgumentNull(name); 368ErrorUtilities.VerifyThrowArgumentNull(name);
Delete.cs (1)
32ErrorUtilities.VerifyThrowArgumentNull(_files, nameof(Files));
ExtensionFoldersRegistryKey.cs (2)
20ErrorUtilities.VerifyThrowArgumentNull(registryKey); 21ErrorUtilities.VerifyThrowArgumentNull(targetFrameworkVersion);
FileMatcher.cs (8)
231ErrorUtilities.ThrowInternalError("Unexpected filesystem entity type."); 449ErrorUtilities.VerifyThrow(!HasWildcards(path), 519ErrorUtilities.VerifyThrow(entries.Count == 1, 844ErrorUtilities.VerifyThrow((recursionState.SearchData.Filespec == null) || (recursionState.SearchData.RegexFileMatch == null), 847ErrorUtilities.VerifyThrow((recursionState.SearchData.Filespec != null) || (recursionState.SearchData.RegexFileMatch != null), 850ErrorUtilities.VerifyThrow(recursionState.RemainingWildcardDirectory != null, "Expected non-null remaning wildcard directory."); 1186ErrorUtilities.VerifyThrow( 1678ErrorUtilities.ThrowInternalError("Unexpected empty 'input' provided.");
FileState.cs (2)
130ErrorUtilities.ThrowInternalErrorUnreachable(); 250ErrorUtilities.VerifyThrowArgumentLength(filename);
FileUtilities.cs (10)
191ErrorUtilities.ThrowArgument("DebugPathTooLong", directory); 392ErrorUtilities.VerifyThrowInternalLength(path, nameof(path)); 393ErrorUtilities.VerifyThrow(trailingSegmentsToKeep >= 0, "trailing segments must be positive"); 464ErrorUtilities.VerifyThrowArgumentLength(path); 1135ErrorUtilities.VerifyThrowArgumentNull(basePath); 1136ErrorUtilities.VerifyThrowArgumentLength(path); 1144ErrorUtilities.VerifyThrow(splitPath.Length > 0, "Cannot call MakeRelative on a path of only slashes."); 1273ErrorUtilities.VerifyThrowArgumentNull(root); 1274ErrorUtilities.VerifyThrowArgumentNull(paths); 1484ErrorUtilities.ThrowArgument("InvalidGetPathOfFileAboveParameter", file);
FindAppConfigFile.cs (2)
39ErrorUtilities.VerifyThrowArgumentNull(_primaryList, nameof(PrimaryList)); 53ErrorUtilities.VerifyThrowArgumentNull(_secondaryList, nameof(SecondaryList));
FindInList.cs (1)
30ErrorUtilities.VerifyThrowArgumentNull(_list, nameof(List));
GenerateResource.cs (5)
620ErrorUtilities.VerifyThrowInternalNull(resGenCommand); 2107ErrorUtilities.VerifyThrow(OutputResources != null && OutputResources.Length != 0, "Should be at least one output resource"); 2191ErrorUtilities.VerifyThrow(_cache != null, "We did not create a cache!"); 2725ErrorUtilities.VerifyThrow(_readers.Count == 1, 2735ErrorUtilities.VerifyThrow(_readers.Count == 1,
GetAssemblyIdentity.cs (1)
33ErrorUtilities.VerifyThrowArgumentNull(_assemblyFiles, nameof(AssemblyFiles));
GetInstalledSDKLocations.cs (2)
71ErrorUtilities.VerifyThrowArgumentNull(value, nameof(TargetPlatformVersion)); 86ErrorUtilities.VerifyThrowArgumentNull(value, nameof(TargetPlatformIdentifier));
GetSDKReferenceFiles.cs (4)
97ErrorUtilities.VerifyThrowArgumentNull(value, nameof(CacheFileFolderPath)); 111ErrorUtilities.VerifyThrowArgumentNull(value, nameof(ResolvedSDKReferences)); 126ErrorUtilities.VerifyThrowArgumentNull(value, nameof(ReferenceExtensions)); 664ErrorUtilities.VerifyThrowArgument(sdkIdentity.Length != 0, "GetSDKReferenceFiles.NoOriginalItemSpec", sdk.ItemSpec);
InterningBinaryReader.cs (3)
14using ErrorUtilities = Microsoft.Build.Shared.ErrorUtilities; 126ErrorUtilities.ThrowInternalError("From calculating based on the memorystream, about to read n = {0}. length = {1}, rawPosition = {2}, readLength = {3}, stringLength = {4}, currPos = {5}.", n, length, rawPosition, readLength, stringLength, currPos); 141ErrorUtilities.ThrowInternalError("From getting the length out of BaseStream.Read directly, about to read n = {0}. readLength = {1}, stringLength = {2}, currPos = {3}", n, readLength, stringLength, currPos);
MakeDir.cs (1)
24ErrorUtilities.VerifyThrowArgumentNull(_directories, nameof(Directories));
Modifiers.cs (8)
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]), 588ErrorUtilities.ThrowInternalError("\"{0}\" is not a valid item-spec modifier.", modifier); 597ErrorUtilities.ThrowInternalError("\"{0}\" is not a valid item-spec modifier.", modifier); 602ErrorUtilities.ThrowInvalidOperation("Shared.InvalidFilespecForTransform", modifier, itemSpec, e.Message);
MSBuild.cs (4)
165ErrorUtilities.ThrowInternalError("Unexpected case {0}", _skipNonExistentProjects); 169ErrorUtilities.ThrowInternalErrorUnreachable(); 352ErrorUtilities.VerifyThrow(skipNonExistProjects == SkipNonExistentProjectsBehavior.Error, "skipNonexistentProjects has unexpected value {0}", skipNonExistProjects); 688ErrorUtilities.VerifyThrowArgument(ConversionUtilities.CanConvertStringToBool(value), "MSBuild.InvalidSkipNonexistentProjectValue");
MSBuildNameIgnoreCaseComparer.cs (2)
49ErrorUtilities.ThrowInternalError("Invalid lengthToCompare '{0}' {1} {2}", constrainedString, start, lengthToCompare); 54ErrorUtilities.ThrowInternalError("Invalid start '{0}' {1} {2}", constrainedString, start, lengthToCompare);
PrintLineDebugger.cs (4)
30ErrorUtilities.VerifyThrowInternalNull(propertyInfo); 77ErrorUtilities.ThrowInternalError("Cannot set a new writer over an old writer. Remove the old one first"); 99ErrorUtilities.ThrowInternalError("Cannot unset an already null writer"); 161ErrorUtilities.ThrowInternalError($"The writer from this {nameof(PrintLineDebugger)} instance differs from the static writer.");
ReadOnlyCollection.cs (6)
38ErrorUtilities.VerifyThrow(backing != null, "Need backing collection"); 101ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 109ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 132ErrorUtilities.VerifyThrowArgumentNull(array); 155ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 188ErrorUtilities.VerifyThrowArgumentNull(array);
ReadOnlyEmptyCollection.cs (3)
87ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 95ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 118ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
ReadOnlyEmptyDictionary.cs (6)
176ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 185ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 201ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 219ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 227ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 250ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
RedistList.cs (4)
294ErrorUtilities.VerifyThrowArgumentNull(frameworkDirectory); 432ErrorUtilities.VerifyThrowArgumentNull(assemblyName); 994ErrorUtilities.VerifyThrowArgumentNull(subsetToSearchFor); 1018ErrorUtilities.VerifyThrowArgumentNull(frameworkDirectory);
RemoveDir.cs (1)
31ErrorUtilities.VerifyThrowArgumentNull(_directories, nameof(Directories));
ResolveProjectBase.cs (1)
33ErrorUtilities.VerifyThrowArgumentNull(_projectReferences, nameof(ProjectReferences));
ResolveSDKReference.cs (5)
124ErrorUtilities.VerifyThrowArgumentNull(value, nameof(SDKReferences)); 140ErrorUtilities.VerifyThrowArgumentNull(value, nameof(InstalledSDKs)); 729ErrorUtilities.VerifyThrowArgumentNull(taskItem); 730ErrorUtilities.VerifyThrowArgumentLength(sdkName); 731ErrorUtilities.VerifyThrowArgumentLength(sdkVersion);
ResourceUtilities.cs (6)
42ErrorUtilities.VerifyThrowInternalNull(message); 438ErrorUtilities.ThrowInternalError( 464ErrorUtilities.ThrowInternalError("The resource string \"" + resourceName + "\" was not found."); 472ErrorUtilities.ThrowInternalError(e.Message); 479ErrorUtilities.ThrowInternalError(e.Message); 486ErrorUtilities.ThrowInternalError(e.Message);
SGen.cs (2)
117ErrorUtilities.ThrowInternalErrorUnreachable(); 124ErrorUtilities.ThrowInternalErrorUnreachable();
StreamMappedString.cs (5)
195ErrorUtilities.VerifyThrow(originalPageNumber != _currentPageNumber, "Expected a new page."); 290ErrorUtilities.VerifyThrow(_charactersRead != _pageSize, "Attempt to append to non-last page."); 305ErrorUtilities.VerifyThrow(_priorPage != null, "There is no last character in the stream."); 389ErrorUtilities.VerifyThrow(charactersExtracted > 0, "Expected non-zero extraction count."); 404ErrorUtilities.VerifyThrow(page >= _currentPageNumber - 1 && page <= _currentPageNumber, "Could not get character count for this page.");
SystemState.cs (1)
171ErrorUtilities.VerifyThrowArgumentNull(translator);
TaskLoggingHelperExtension.cs (4)
93ErrorUtilities.VerifyThrowArgumentNull(resourceName); 94ErrorUtilities.VerifyThrowInvalidOperation(TaskResources != null, "Shared.TaskResourcesNotRegistered", TaskName); 95ErrorUtilities.VerifyThrowInvalidOperation(TaskSharedResources != null, "Shared.TaskResourcesNotRegistered", TaskName); 105ErrorUtilities.VerifyThrowArgument(resourceString != null, "Shared.TaskResourceNotFound", resourceName, TaskName);
TempFileUtilities.cs (2)
162ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(directory, nameof(directory)); 188ErrorUtilities.VerifyThrow(!FileSystems.Default.FileExists(file), "Guid should be unique");
tokenCharReader.cs (2)
268ErrorUtilities.VerifyThrow(originalPosition != _position, "Expected position to be incremented."); 275ErrorUtilities.VerifyThrow(originalPosition != _position, "Expected position to be incremented.");
Unzip.cs (1)
174ErrorUtilities.VerifyThrowInvalidOperation(fullDestinationPath.StartsWith(fullDestinationDirectoryPath, FileUtilities.PathComparison), "Unzip.ZipSlipExploit", fullDestinationPath);
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");
XslTransformation.cs (3)
73ErrorUtilities.VerifyThrowArgumentNull(_outputPaths, "OutputPath"); 100ErrorUtilities.VerifyThrowArgumentNull(_outputPaths, "OutputPath"); 491ErrorUtilities.ThrowInternalErrorUnreachable();
Microsoft.Build.Tasks.UnitTests (9)
ErrorUtilities_Tests.cs (7)
21ErrorUtilities.VerifyThrow(false, "msbuild rules"); 36ErrorUtilities.VerifyThrow(true, "msbuild rules"); 43ErrorUtilities.VerifyThrow(true, "blah"); 50ErrorUtilities.VerifyThrow(true, "{0}", "a"); 57ErrorUtilities.VerifyThrow(true, "{0}{1}", "a", "b"); 64ErrorUtilities.VerifyThrow(true, "{0}{1}{2}", "a", "b", "c"); 71ErrorUtilities.VerifyThrow(true, "{0}{1}{2}{3}", "a", "b", "c", "d");
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.");