146 references to ErrorUtilities
Microsoft.Build.Tasks.Core (139)
AppConfig\BindingRedirect.cs (4)
41ErrorUtilities.VerifyThrowArgument(!String.IsNullOrEmpty(oldVersion), "AppConfig.BindingRedirectMissingOldVersion"); 66ErrorUtilities.ThrowArgument(e, "AppConfig.InvalidOldVersionAttribute", e.Message); 72ErrorUtilities.VerifyThrowArgument(!String.IsNullOrEmpty(newVersionAttribute), "AppConfig.BindingRedirectMissingNewVersion"); 80ErrorUtilities.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)
73ErrorUtilities.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\Node\OutOfProcRarClient.cs (2)
89ErrorUtilities.ThrowInternalError($"Received unexpected log event type {logMessagePacket.Type}"); 96ErrorUtilities.ThrowInternalError($"Received unexpected packet type {packet.Type}");
AssemblyDependency\Node\OutOfProcRarNodeEndpoint.cs (1)
117ErrorUtilities.ThrowInternalError($"Received unexpected packet type {packetType}");
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)
427ErrorUtilities.VerifyThrow(assemblyName.Name != null, "Got an empty assembly name."); 452ErrorUtilities.VerifyThrow(assemblyName.Name != null, "Got an empty assembly name."); 1677ErrorUtilities.VerifyThrow(dependencyIterations < maxIterations, "Maximum iterations exceeded while looking for dependencies."); 1696ErrorUtilities.VerifyThrow(moreResolvableIterations < maxIterations, "Maximum iterations exceeded while looking for resolvable references."); 2352ErrorUtilities.VerifyThrow(assemblyReference0.assemblyName.FullName != null, "Got a null assembly name fullname. (0)"); 2353ErrorUtilities.VerifyThrow(assemblyReference1.assemblyName.FullName != null, "Got a null assembly name fullname. (1)"); 2558ErrorUtilities.VerifyThrowInternalNull(a); 2559ErrorUtilities.VerifyThrowInternalNull(b);
AssemblyDependency\ResolveAssemblyReference.cs (8)
347ErrorUtilities.VerifyThrowArgumentNull(value, "TargetFrameworkSubsets"); 497ErrorUtilities.VerifyThrowArgumentNull(value, "InstalledAssemblySubsetTables"); 528ErrorUtilities.VerifyThrowArgumentNull(value, "FullFrameworkAssemblyTables"); 880ErrorUtilities.VerifyThrowArgumentNull(value, "FullTargetFrameworkSubsetNames"); 898ErrorUtilities.VerifyThrowArgumentNull(value, "profileName"); 917ErrorUtilities.VerifyThrowArgumentNull(value, "FullFrameworkFolders"); 1372ErrorUtilities.VerifyThrowInternalNull(conflictCandidate); 1802ErrorUtilities.VerifyThrowArgumentNull(reference);
AssemblyFoldersFromConfig.cs (2)
31ErrorUtilities.VerifyThrowArgumentNull(configFile); 32ErrorUtilities.VerifyThrowArgumentNull(targetRuntimeVersion);
AssemblyResources.cs (2)
27ErrorUtilities.VerifyThrow(resource != null, "Missing resource '{0}'", name); 43ErrorUtilities.VerifyThrow(resource != null, "Missing resource '{0}'", name);
CombinePath.cs (1)
38ErrorUtilities.VerifyThrowArgumentNull(_paths, nameof(Paths));
CommandLineBuilderExtension.cs (1)
236ErrorUtilities.VerifyThrow(
CommunicationsUtilities.cs (6)
265ErrorUtilities.VerifyThrow( 478ErrorUtilities.VerifyThrow(bytes.Length == 4, "Int should be 4 bytes"); 694ErrorUtilities.VerifyThrow(taskHostParameters.Runtime != null, "Should always have an explicit runtime when we call this method."); 695ErrorUtilities.VerifyThrow(taskHostParameters.Architecture != null, "Should always have an explicit architecture when we call this method."); 711ErrorUtilities.ThrowInternalErrorUnreachable(); 745ErrorUtilities.ThrowInternalErrorUnreachable();
ConvertToAbsolutePath.cs (1)
30ErrorUtilities.VerifyThrowArgumentNull(_paths, nameof(Paths));
Copy.cs (1)
855ErrorUtilities.VerifyThrowArgumentLength(sourceFolder.ItemSpec);
CreateManifestResourceName.cs (4)
56ErrorUtilities.VerifyThrowArgumentNull(_resourceFiles, nameof(ResourceFiles)); 310ErrorUtilities.VerifyThrowArgumentNull(subName); 348ErrorUtilities.VerifyThrowArgumentNull(name); 380ErrorUtilities.VerifyThrowArgumentNull(name);
Delete.cs (1)
33ErrorUtilities.VerifyThrowArgumentNull(_files, nameof(Files));
ExtensionFoldersRegistryKey.cs (2)
19ErrorUtilities.VerifyThrowArgumentNull(registryKey); 20ErrorUtilities.VerifyThrowArgumentNull(targetFrameworkVersion);
FileIO\WriteLinesToFile.cs (1)
74ErrorUtilities.VerifyThrowArgumentLength(File.ItemSpec);
FileState.cs (2)
131ErrorUtilities.ThrowInternalErrorUnreachable(); 310ErrorUtilities.VerifyThrowArgumentLength(value);
FindAppConfigFile.cs (2)
40ErrorUtilities.VerifyThrowArgumentNull(_primaryList, nameof(PrimaryList)); 54ErrorUtilities.VerifyThrowArgumentNull(_secondaryList, nameof(SecondaryList));
FindInList.cs (1)
31ErrorUtilities.VerifyThrowArgumentNull(_list, nameof(List));
GenerateResource.cs (5)
620ErrorUtilities.VerifyThrowInternalNull(resGenCommand); 2102ErrorUtilities.VerifyThrow(OutputResources != null && OutputResources.Length != 0, "Should be at least one output resource"); 2186ErrorUtilities.VerifyThrow(_cache != null, "We did not create a cache!"); 2718ErrorUtilities.VerifyThrow(_readers.Count == 1, 2728ErrorUtilities.VerifyThrow(_readers.Count == 1,
GetAssemblyIdentity.cs (1)
35ErrorUtilities.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);
LogMessagePacketBase.cs (5)
294ErrorUtilities.VerifyThrow(nodeBuildEvent != null, "nodeBuildEvent was null"); 381ErrorUtilities.VerifyThrow(_eventType != LoggingEventType.CustomEvent, "_eventType should not be a custom event"); 422ErrorUtilities.VerifyThrow(_eventType != LoggingEventType.CustomEvent, "_eventType should not be a custom event"); 443ErrorUtilities.VerifyThrow(_buildEvent is not null, "Not Supported LoggingEventType {0}", _eventType.ToString()); 771ErrorUtilities.ThrowInternalError("Not Supported LoggingEventType {0}", eventType.ToString());
MakeDir.cs (1)
25ErrorUtilities.VerifyThrowArgumentNull(_directories, nameof(Directories));
MSBuild.cs (4)
165ErrorUtilities.ThrowInternalError("Unexpected case {0}", _skipNonExistentProjects); 169ErrorUtilities.ThrowInternalErrorUnreachable(); 355ErrorUtilities.VerifyThrow(skipNonExistProjects == SkipNonExistentProjectsBehavior.Error, "skipNonexistentProjects has unexpected value {0}", skipNonExistProjects); 691ErrorUtilities.VerifyThrowArgument(ConversionUtilities.CanConvertStringToBool(value), "MSBuild.InvalidSkipNonexistentProjectValue");
NodePacketFactory.cs (3)
55ErrorUtilities.ThrowInternalError("No packet handler for type {0}", packetType); 70ErrorUtilities.ThrowInternalError("No packet handler for type {0}", packetType); 84ErrorUtilities.ThrowInternalError("No packet handler for type {0}", packet.Type);
PrintLineDebugger.cs (4)
32ErrorUtilities.VerifyThrowInternalNull(propertyInfo); 83ErrorUtilities.ThrowInternalError("Cannot set a new writer over an old writer. Remove the old one first"); 105ErrorUtilities.ThrowInternalError("Cannot unset an already null writer"); 169ErrorUtilities.ThrowInternalError($"The writer from this {nameof(PrintLineDebugger)} instance differs from the static writer.");
RedistList.cs (4)
295ErrorUtilities.VerifyThrowArgumentNull(frameworkDirectory); 433ErrorUtilities.VerifyThrowArgumentNull(assemblyName); 1035ErrorUtilities.VerifyThrowArgumentNull(subsetToSearchFor); 1059ErrorUtilities.VerifyThrowArgumentNull(frameworkDirectory);
RemoveDir.cs (1)
35ErrorUtilities.VerifyThrowArgumentNull(_directories, nameof(Directories));
ResolveProjectBase.cs (1)
33ErrorUtilities.VerifyThrowArgumentNull(_projectReferences, nameof(ProjectReferences));
ResolveSDKReference.cs (5)
128ErrorUtilities.VerifyThrowArgumentNull(value, nameof(SDKReferences)); 144ErrorUtilities.VerifyThrowArgumentNull(value, nameof(InstalledSDKs)); 733ErrorUtilities.VerifyThrowArgumentNull(taskItem); 734ErrorUtilities.VerifyThrowArgumentLength(sdkName); 735ErrorUtilities.VerifyThrowArgumentLength(sdkVersion);
ResourceUtilities.cs (6)
39ErrorUtilities.VerifyThrowInternalNull(message); 428ErrorUtilities.ThrowInternalError( 454ErrorUtilities.ThrowInternalError("The resource string \"" + resourceName + "\" was not found."); 462ErrorUtilities.ThrowInternalError(e.Message); 469ErrorUtilities.ThrowInternalError(e.Message); 476ErrorUtilities.ThrowInternalError(e.Message);
SGen.cs (2)
118ErrorUtilities.ThrowInternalErrorUnreachable(); 125ErrorUtilities.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);
TaskParameter.cs (12)
117ErrorUtilities.VerifyThrow( 154ErrorUtilities.ThrowInternalErrorUnreachable(); 189ErrorUtilities.ThrowInternalErrorUnreachable(); 260ErrorUtilities.ThrowInternalErrorUnreachable(); 635ErrorUtilities.VerifyThrowInternalNull(_escapedItemSpec); 734ErrorUtilities.VerifyThrowArgumentLength(metadataName); 738ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsDerivableItemSpecModifier(metadataName), "Shared.CannotChangeItemSpecModifiers", metadataName); 751ErrorUtilities.VerifyThrowArgumentNull(metadataName); 752ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsItemSpecModifier(metadataName), "Shared.CannotChangeItemSpecModifiers", metadataName); 774ErrorUtilities.VerifyThrowArgumentNull(destinationItem); 957ErrorUtilities.VerifyThrowInternalNull(_escapedItemSpec); 958ErrorUtilities.VerifyThrowInternalNull(_customEscapedMetadata);
tokenCharReader.cs (2)
267ErrorUtilities.VerifyThrow(originalPosition != _position, "Expected position to be incremented."); 274ErrorUtilities.VerifyThrow(originalPosition != _position, "Expected position to be incremented.");
Unzip.cs (1)
190ErrorUtilities.VerifyThrowInvalidOperation(fullDestinationPath.Value.StartsWith(fullDestinationDirectoryPath, FileUtilities.PathComparison), "Unzip.ZipSlipExploit", fullDestinationPath);
XMakeAttributes.cs (4)
162ErrorUtilities.VerifyThrow(runtimeA != String.Empty && runtimeB != String.Empty, "We should never get an empty string passed to this method"); 206ErrorUtilities.VerifyThrow(runtimeA != String.Empty && runtimeB != String.Empty, "We should never get an empty string passed to this method"); 279ErrorUtilities.VerifyThrow(architectureA != String.Empty && architectureB != String.Empty, "We should never get an empty string passed to this method"); 346ErrorUtilities.VerifyThrow(architectureA != String.Empty && architectureB != String.Empty, "We should never get an empty string passed to this method");
XslTransformation.cs (3)
80ErrorUtilities.VerifyThrowArgumentNull(_outputPaths, "OutputPath"); 107ErrorUtilities.VerifyThrowArgumentNull(_outputPaths, "OutputPath"); 515ErrorUtilities.ThrowInternalErrorUnreachable();
Microsoft.Build.Tasks.UnitTests (7)
ErrorUtilities_Tests.cs (7)
19ErrorUtilities.VerifyThrow(false, "msbuild rules"); 34ErrorUtilities.VerifyThrow(true, "msbuild rules"); 41ErrorUtilities.VerifyThrow(true, "blah"); 48ErrorUtilities.VerifyThrow(true, "{0}", "a"); 55ErrorUtilities.VerifyThrow(true, "{0}{1}", "a", "b"); 62ErrorUtilities.VerifyThrow(true, "{0}{1}{2}", "a", "b", "c"); 69ErrorUtilities.VerifyThrow(true, "{0}{1}{2}{3}", "a", "b", "c", "d");