110 references to ErrorUtilities
MSBuildTaskHost (110)
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.");
AssemblyResources.cs (1)
32ErrorUtilities.VerifyThrow(resource != null, "Missing resource '{0}'", name);
CommunicationsUtilities.cs (5)
472ErrorUtilities.VerifyThrow(bytes.Length == 4, "Int should be 4 bytes"); 628ErrorUtilities.VerifyThrow(taskHostParameters.TryGetValue(XMakeAttributes.runtime, out string runtimeVersion), "Should always have an explicit runtime when we call this method."); 629ErrorUtilities.VerifyThrow(taskHostParameters.TryGetValue(XMakeAttributes.architecture, out string architecture), "Should always have an explicit architecture when we call this method."); 645ErrorUtilities.ThrowInternalErrorUnreachable(); 679ErrorUtilities.ThrowInternalErrorUnreachable();
FileSystem\MSBuildTaskHostFileSystem.cs (1)
73ErrorUtilities.VerifyThrow(searchOption == SearchOption.TopDirectoryOnly, $"In net20 {nameof(Directory.GetFileSystemEntries)} does not take a {nameof(SearchOption)} parameter");
FileUtilities.cs (8)
204ErrorUtilities.ThrowArgument("DebugPathTooLong", directory); 485ErrorUtilities.VerifyThrowArgumentLength(path); 1168ErrorUtilities.VerifyThrowArgumentNull(basePath); 1169ErrorUtilities.VerifyThrowArgumentLength(path); 1177ErrorUtilities.VerifyThrow(splitPath.Length > 0, "Cannot call MakeRelative on a path of only slashes."); 1306ErrorUtilities.VerifyThrowArgumentNull(root); 1307ErrorUtilities.VerifyThrowArgumentNull(paths); 1517ErrorUtilities.ThrowArgument("InvalidGetPathOfFileAboveParameter", file);
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);
LoadedType.cs (3)
31ErrorUtilities.VerifyThrow(type != null, "We must have the type."); 32ErrorUtilities.VerifyThrow(assemblyLoadInfo != null, "We must have the assembly the type was loaded from."); 33ErrorUtilities.VerifyThrow(loadedAssembly is not null, "The assembly should always be loaded even if only by MetadataLoadContext.");
LogMessagePacketBase.cs (5)
313ErrorUtilities.VerifyThrow(nodeBuildEvent != null, "nodeBuildEvent was null"); 410ErrorUtilities.VerifyThrow(_eventType != LoggingEventType.CustomEvent, "_eventType should not be a custom event"); 465ErrorUtilities.VerifyThrow(_eventType != LoggingEventType.CustomEvent, "_eventType should not be a custom event"); 508ErrorUtilities.VerifyThrow(_buildEvent is not null, "Not Supported LoggingEventType {0}", _eventType.ToString()); 842ErrorUtilities.ThrowInternalError("Not Supported LoggingEventType {0}", eventType.ToString());
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);
NamedPipeUtil.cs (1)
36ErrorUtilities.ThrowInternalError("Task host used on unix in retrieving the pipe name.");
NodeEndpointOutOfProcBase.cs (9)
155ErrorUtilities.VerifyThrow(_status == LinkStatus.Inactive, "Link not inactive. Status is {0}", _status); 156ErrorUtilities.VerifyThrowArgumentNull(factory, nameof(factory)); 168ErrorUtilities.ThrowInternalError("Connect() not valid on the out of proc endpoint."); 274ErrorUtilities.VerifyThrow(_status != newStatus, "Attempting to change status to existing status {0}.", _status); 297ErrorUtilities.VerifyThrow(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread."); 318ErrorUtilities.VerifyThrowArgumentNull(packet, nameof(packet)); 319ErrorUtilities.VerifyThrow(_packetQueue != null, "packetQueue is null"); 320ErrorUtilities.VerifyThrow(_packetAvailable != null, "packetAvailable is null"); 683ErrorUtilities.ThrowInternalError("waitId {0} out of range.", waitId);
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);
OutOfProcTaskHost.cs (1)
127ErrorUtilities.ThrowInternalErrorUnreachable();
OutOfProcTaskHostNode.cs (13)
216ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!"); 228ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!"); 240ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!"); 252ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!"); 731ErrorUtilities.VerifyThrow(!_isTaskExecuting, "Why are we getting a TaskHostConfiguration packet while we're still executing a task?"); 745ErrorUtilities.VerifyThrow(!_isTaskExecuting, "The task should be done executing before CompleteTask."); 752ErrorUtilities.VerifyThrowInternalNull(_taskCompletePacket, "taskCompletePacket"); 807ErrorUtilities.VerifyThrow(!_isTaskExecuting, "We should never have a task in the process of executing when we receive NodeBuildComplete."); 1026ErrorUtilities.VerifyThrowInternalNull(s_mismatchedEnvironmentValues, "mismatchedEnvironmentValues"); 1089ErrorUtilities.VerifyThrowInternalNull(s_mismatchedEnvironmentValues, "mismatchedEnvironmentValues"); 1217ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration when we're trying to log messages!"); 1234ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration when we're trying to log warnings!"); 1257ErrorUtilities.VerifyThrow(_currentConfiguration != null, "We should never have a null configuration when we're trying to log errors!");
OutOfProcTaskHostTaskResult.cs (3)
65ErrorUtilities.VerifyThrowInternalNull(taskException); 70ErrorUtilities.VerifyThrow( 79ErrorUtilities.VerifyThrow(exceptionMessage != null, "If we have message args, we need a message.");
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");
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);
TaskHostConfiguration.cs (2)
165ErrorUtilities.VerifyThrowInternalLength(taskName, nameof(taskName)); 166ErrorUtilities.VerifyThrowInternalLength(taskLocation, nameof(taskLocation));
TaskHostTaskComplete.cs (1)
108ErrorUtilities.VerifyThrowInternalNull(result);
TaskParameter.cs (13)
113ErrorUtilities.VerifyThrow( 150ErrorUtilities.ThrowInternalErrorUnreachable(); 185ErrorUtilities.ThrowInternalErrorUnreachable(); 256ErrorUtilities.ThrowInternalErrorUnreachable(); 394ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "Cannot call this method when reading!"); 461ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.ReadFromStream, "Cannot call this method when writing!"); 755ErrorUtilities.VerifyThrowInternalNull(escapedItemSpec); 846ErrorUtilities.VerifyThrowArgumentLength(metadataName); 850ErrorUtilities.VerifyThrowArgument(!FileUtilities.ItemSpecModifiers.IsDerivableItemSpecModifier(metadataName), "Shared.CannotChangeItemSpecModifiers", metadataName); 863ErrorUtilities.VerifyThrowArgumentNull(metadataName); 864ErrorUtilities.VerifyThrowArgument(!FileUtilities.ItemSpecModifiers.IsItemSpecModifier(metadataName), "Shared.CannotChangeItemSpecModifiers", metadataName); 886ErrorUtilities.VerifyThrowArgumentNull(destinationItem); 953ErrorUtilities.VerifyThrowArgumentNull(metadataName);
TypeLoader.cs (4)
40ErrorUtilities.VerifyThrow(isDesiredType != null, "need a type filter"); 223ErrorUtilities.VerifyThrowArgumentNull(typeFilter, "typefilter"); 224ErrorUtilities.VerifyThrowArgumentNull(loadInfo); 237ErrorUtilities.VerifyThrowArgumentNull(typeName);
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");