Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1322,9 +1322,9 @@ private int GetNextBuildRequestId()
/// <param name="config">The configuration to be mapped.</param>
private void IssueConfigurationRequest(BuildRequestConfiguration config)
{
ErrorUtilities.VerifyThrowArgument(config.WasGeneratedByNode, "InvalidConfigurationId");
ErrorUtilities.VerifyThrow(config.WasGeneratedByNode, "InvalidConfigurationId");
ErrorUtilities.VerifyThrowArgumentNull(config, nameof(config));
ErrorUtilities.VerifyThrowInvalidOperation(_unresolvedConfigurations.HasConfiguration(config.ConfigurationId), "NoUnresolvedConfiguration");
ErrorUtilities.VerifyThrow(_unresolvedConfigurations.HasConfiguration(config.ConfigurationId), "NoUnresolvedConfiguration");
TraceEngine("Issuing configuration request for node config {0}", config.ConfigurationId);
RaiseNewConfigurationRequest(config);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Build/BackEnd/Components/Caching/ResultsCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void ClearResults()
/// <returns>The build results for the specified request.</returns>
public BuildResult GetResultForRequest(BuildRequest request)
{
ErrorUtilities.VerifyThrowArgument(request.IsConfigurationResolved, "UnresolvedConfigurationInRequest");
ErrorUtilities.VerifyThrow(request.IsConfigurationResolved, "UnresolvedConfigurationInRequest");

lock (_resultsByConfiguration)
{
Expand Down Expand Up @@ -155,7 +155,7 @@ public BuildResult GetResultsForConfiguration(int configurationId)
/// <returns>A response indicating the results, if any, and the targets needing to be built, if any.</returns>
public ResultsCacheResponse SatisfyRequest(BuildRequest request, List<string> configInitialTargets, List<string> configDefaultTargets, bool skippedResultsDoNotCauseCacheMiss)
{
ErrorUtilities.VerifyThrowArgument(request.IsConfigurationResolved, "UnresolvedConfigurationInRequest");
ErrorUtilities.VerifyThrow(request.IsConfigurationResolved, "UnresolvedConfigurationInRequest");
ResultsCacheResponse response = new ResultsCacheResponse(ResultsCacheResponseType.NotSatisfied);

lock (_resultsByConfiguration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ public static T FactoryForDeserializingTypeWithName<T>(this ITranslator translat
translator.Translate(ref typeName);

var type = Type.GetType(typeName);
ErrorUtilities.VerifyThrowInvalidOperation(type != null, "type cannot be null");
ErrorUtilities.VerifyThrowInvalidOperation(
ErrorUtilities.VerifyThrow(type != null, "type cannot be null");
ErrorUtilities.VerifyThrow(
typeof(T).IsAssignableFrom(type),
$"{typeName} must be a {typeof(T).FullName}");
ErrorUtilities.VerifyThrowInvalidOperation(
ErrorUtilities.VerifyThrow(
typeof(ITranslatable).IsAssignableFrom(type),
$"{typeName} must be a {nameof(ITranslatable)}");

Expand All @@ -85,9 +85,9 @@ public static T FactoryForDeserializingTypeWithName<T>(this ITranslator translat
{
ConstructorInfo constructor = null;
constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic, null, Type.EmptyTypes, null);
ErrorUtilities.VerifyThrowInvalidOperation(
ErrorUtilities.VerifyThrow(
constructor != null,
$"{typeName} must have a private parameterless constructor");
"{0} must have a private parameterless constructor", typeName);
return constructor;
});

Expand Down
2 changes: 1 addition & 1 deletion src/Build/BackEnd/Components/ProjectCache/CacheResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static CacheResult IndicateCacheHit(IReadOnlyCollection<PluginTargetResul

public static CacheResult IndicateNonCacheHit(CacheResultType resultType)
{
ErrorUtilities.VerifyThrowInvalidOperation(resultType != CacheResultType.CacheHit, "CantBeCacheHit");
ErrorUtilities.VerifyThrow(resultType != CacheResultType.CacheHit, "CantBeCacheHit");
return new CacheResult(resultType);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Build/Construction/ProjectElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public ProjectElement Clone()
public virtual void CopyFrom(ProjectElement element)
{
ErrorUtilities.VerifyThrowArgumentNull(element, nameof(element));
ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), nameof(element));
ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType");

if (this == element)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Construction/ProjectElementContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ public void RemoveAllChildren()
public virtual void DeepCopyFrom(ProjectElementContainer element)
{
ErrorUtilities.VerifyThrowArgumentNull(element, nameof(element));
ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), nameof(element));
ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType");

if (this == element)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Construction/ProjectExtensionsElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public string this[string name]
public override void CopyFrom(ProjectElement element)
{
ErrorUtilities.VerifyThrowArgumentNull(element, nameof(element));
ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), nameof(element));
ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType");

if (this == element)
{
Expand Down
2 changes: 0 additions & 2 deletions src/Build/Errors/InvalidToolsetDefinitionException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ internal static void Throw(
string resourceName,
params string[] args)
{
#if DEBUG
ResourceUtilities.VerifyResourceStringExists(resourceName);
#endif
string errorCode;
string helpKeyword;
string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword(out errorCode, out helpKeyword, resourceName, (object[])args);
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Instance/TaskRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ internal RegisteredTaskIdentity(string name, IDictionary<string, string> taskIde

private static IDictionary<string, string> CreateTaskIdentityParametersDictionary(IDictionary<string, string> initialState = null, int? initialCount = null)
{
ErrorUtilities.VerifyThrowInvalidOperation(initialState == null || initialCount == null, "at most one can be non-null");
ErrorUtilities.VerifyThrow(initialState == null || initialCount == null, "at most one can be non-null");

if (initialState != null)
{
Expand Down
15 changes: 15 additions & 0 deletions src/Build/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@
likely because of a programming error in the logger). When a logger dies, we cannot proceed with the build, and we throw a
special exception to abort the build.</comment>
</data>
<data name="General.TwoVectorsMustHaveSameLength">
<value>MSB3094: "{2}" refers to {0} item(s), and "{3}" refers to {1} item(s). They must have the same number of items.</value>
<comment>{StrBegin="MSB3094: "}</comment>
</data>
<data name="FatalTaskError" xml:space="preserve">
<value>MSB4018: The "{0}" task failed unexpectedly.</value>
<comment>{StrBegin="MSB4018: "}UE: This message is shown when a task terminates because of an unhandled exception. The cause is most likely a
Expand Down Expand Up @@ -1987,4 +1991,15 @@ Utilization: {0} Average Utilization: {1:###.0}</value>
<value>MSB4120: Item '{0}' definition within target references itself via (qualified or unqualified) metadatum '{1}'. This can lead to unintended expansion and cross-applying of pre-existing items. More info: https://aka.ms/msbuild/metadata-self-ref</value>
<comment>{StrBegin="MSB4120: "}</comment>
</data>
<data name="CannotCopyFromElementOfThatType" xml:space="preserve">
<value>MSB4277: Cannot copy from object of that type.</value>
<comment>{StrBegin="MSB4277: "}</comment>
</data>
<!--
The Build message bucket is: MSB4000 - MSB4999

Next message code should be MSB4278

Don't forget to update this comment after using a new code.
-->
</root>
10 changes: 10 additions & 0 deletions src/Build/Resources/xlf/Strings.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Build/Resources/xlf/Strings.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Build/Resources/xlf/Strings.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Build/Resources/xlf/Strings.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Build/Resources/xlf/Strings.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Build/Resources/xlf/Strings.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Build/Resources/xlf/Strings.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Build/Resources/xlf/Strings.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading