45 references to VerifyThrow
MSBuildTaskHost (45)
AssemblyLoadInfo.cs (4)
27
ErrorUtilities.
VerifyThrow
((!string.IsNullOrEmpty(assemblyName)) || (!string.IsNullOrEmpty(assemblyFile)),
29
ErrorUtilities.
VerifyThrow
((assemblyName == null) || (assemblyFile == null),
102
ErrorUtilities.
VerifyThrow
(translator.Mode == TranslationDirection.WriteToStream, "write only");
179
ErrorUtilities.
VerifyThrow
(Path.IsPathRooted(assemblyFile), "Assembly file path should be rooted");
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.");
CommunicationsUtilities.cs (3)
472
ErrorUtilities.
VerifyThrow
(bytes.Length == 4, "Int should be 4 bytes");
628
ErrorUtilities.
VerifyThrow
(taskHostParameters.TryGetValue(XMakeAttributes.runtime, out string runtimeVersion), "Should always have an explicit runtime when we call this method.");
629
ErrorUtilities.
VerifyThrow
(taskHostParameters.TryGetValue(XMakeAttributes.architecture, out string architecture), "Should always have an explicit architecture when we call this method.");
FileSystem\MSBuildTaskHostFileSystem.cs (1)
73
ErrorUtilities.
VerifyThrow
(searchOption == SearchOption.TopDirectoryOnly, $"In net20 {nameof(Directory.GetFileSystemEntries)} does not take a {nameof(SearchOption)} parameter");
FileUtilities.cs (1)
1177
ErrorUtilities.
VerifyThrow
(splitPath.Length > 0, "Cannot call MakeRelative on a path of only slashes.");
LoadedType.cs (3)
31
ErrorUtilities.
VerifyThrow
(type != null, "We must have the type.");
32
ErrorUtilities.
VerifyThrow
(assemblyLoadInfo != null, "We must have the assembly the type was loaded from.");
33
ErrorUtilities.
VerifyThrow
(loadedAssembly is not null, "The assembly should always be loaded even if only by MetadataLoadContext.");
LogMessagePacketBase.cs (3)
313
ErrorUtilities.
VerifyThrow
(nodeBuildEvent != null, "nodeBuildEvent was null");
410
ErrorUtilities.
VerifyThrow
(_eventType != LoggingEventType.CustomEvent, "_eventType should not be a custom event");
465
ErrorUtilities.
VerifyThrow
(_eventType != LoggingEventType.CustomEvent, "_eventType should not be a custom event");
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]),
NodeEndpointOutOfProcBase.cs (3)
297
ErrorUtilities.
VerifyThrow
(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread.");
319
ErrorUtilities.
VerifyThrow
(_packetQueue != null, "packetQueue is null");
320
ErrorUtilities.
VerifyThrow
(_packetAvailable != null, "packetAvailable is null");
OutOfProcTaskHostNode.cs (10)
216
ErrorUtilities.
VerifyThrow
(_currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!");
228
ErrorUtilities.
VerifyThrow
(_currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!");
240
ErrorUtilities.
VerifyThrow
(_currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!");
252
ErrorUtilities.
VerifyThrow
(_currentConfiguration != null, "We should never have a null configuration during a BuildEngine callback!");
731
ErrorUtilities.
VerifyThrow
(!_isTaskExecuting, "Why are we getting a TaskHostConfiguration packet while we're still executing a task?");
745
ErrorUtilities.
VerifyThrow
(!_isTaskExecuting, "The task should be done executing before CompleteTask.");
807
ErrorUtilities.
VerifyThrow
(!_isTaskExecuting, "We should never have a task in the process of executing when we receive NodeBuildComplete.");
1217
ErrorUtilities.
VerifyThrow
(_currentConfiguration != null, "We should never have a null configuration when we're trying to log messages!");
1234
ErrorUtilities.
VerifyThrow
(_currentConfiguration != null, "We should never have a null configuration when we're trying to log warnings!");
1257
ErrorUtilities.
VerifyThrow
(_currentConfiguration != null, "We should never have a null configuration when we're trying to log errors!");
OutOfProcTaskHostTaskResult.cs (2)
70
ErrorUtilities.
VerifyThrow
(
79
ErrorUtilities.
VerifyThrow
(exceptionMessage != null, "If we have message args, we need a message.");
TaskParameter.cs (2)
394
ErrorUtilities.
VerifyThrow
(translator.Mode == TranslationDirection.WriteToStream, "Cannot call this method when reading!");
461
ErrorUtilities.
VerifyThrow
(translator.Mode == TranslationDirection.ReadFromStream, "Cannot call this method when writing!");
TypeLoader.cs (1)
40
ErrorUtilities.
VerifyThrow
(isDesiredType != null, "need a type filter");
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");