Skip to content

Commit

Permalink
Exception message review (#22519)
Browse files Browse the repository at this point in the history
Part of #7201
  • Loading branch information
roji authored Oct 20, 2020
1 parent a069e37 commit 5ff9243
Show file tree
Hide file tree
Showing 13 changed files with 363 additions and 360 deletions.
36 changes: 18 additions & 18 deletions src/EFCore.Cosmos/Properties/CosmosStrings.Designer.cs

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

34 changes: 17 additions & 17 deletions src/EFCore.Cosmos/Properties/CosmosStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,25 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ConnectionStringConflictingConfiguration" xml:space="preserve">
<value>Both the connection string and account key or account endpoint were specified. Only specify one set of connection details.</value>
<value>Both the connection string and account key or account endpoint were specified. Specify only one set of connection details.</value>
</data>
<data name="CosmosNotInUse" xml:space="preserve">
<value>Cosmos-specific methods can only be used when the context is using the Cosmos provider.</value>
</data>
<data name="DuplicateDiscriminatorValue" xml:space="preserve">
<value>The discriminator value for '{entityType1}' is '{discriminatorValue}' which is the same for '{entityType2}'. Every concrete entity type mapped to the container '{container}' needs to have a unique discriminator value.</value>
<value>The discriminator value for '{entityType1}' is '{discriminatorValue}' which is the same for '{entityType2}'. Every concrete entity type mapped to the container '{container}' must have a unique discriminator value.</value>
</data>
<data name="ETagNonStringStoreType" xml:space="preserve">
<value>The type of the etag property '{property}' on '{entityType}' is '{propertyType}'. All etag properties need to be strings or have a string converter.</value>
<value>The type of the etag property '{property}' on '{entityType}' is '{propertyType}'. All etag properties must be strings or have a string value converter.</value>
</data>
<data name="IdNonStringStoreType" xml:space="preserve">
<value>The type of the '{idProperty}' property on '{entityType}' is '{propertyType}'. All 'id' properties need to be strings or have a string converter.</value>
<value>The type of the '{idProperty}' property on '{entityType}' is '{propertyType}'. All 'id' properties must be strings or have a string value converter.</value>
</data>
<data name="InvalidDerivedTypeInEntityProjection" xml:space="preserve">
<value>The specified entity type '{derivedType}' is not derived from '{entityType}'.</value>
</data>
<data name="InvalidResourceId" xml:space="preserve">
<value>Unable to generate a valid 'id' value to execute ReadItem query. This usually happens when value provided for one of the properties is null or empty string. Please supply a value that's not null or empty.</value>
<value>Unable to generate a valid 'id' value to execute a 'ReadItem' query. This usually happens when the value provided for one of the properties is 'null' or an empty string. Please supply a value that's not 'null' or an empty string.</value>
</data>
<data name="JsonPropertyCollision" xml:space="preserve">
<value>Both properties '{property1}' and '{property2}' on entity type '{entityType}' are mapped to '{storeName}'. Map one of the properties to a different JSON property.</value>
Expand Down Expand Up @@ -166,7 +166,7 @@
<value>The entity type '{entityType}' has property '{property}' as its concurrency token, but only '_etag' is supported. Consider using 'EntityTypeBuilder.UseETagConcurrency'.</value>
</data>
<data name="NoPartitionKey" xml:space="preserve">
<value>The entity type '{entityType}' does not have a partition key set, but it is mapped to the container '{container}' shared by entity types with partition keys. Configure a partition key on '{entityType}'.</value>
<value>The entity type '{entityType}' does not have a partition key set, but is mapped to the container '{container}' shared by entity types with partition keys. Configure a partition key on '{entityType}'.</value>
</data>
<data name="NoPartitionKeyKey" xml:space="preserve">
<value>The entity type '{entityType}' does not have a key declared on '{partitionKey}' and '{idProperty}' properties. Add a key to '{entityType}' that contains '{partitionKey}' and '{idProperty}'.</value>
Expand All @@ -175,40 +175,40 @@
<value>There is no string-based representation of this query as it's executed using 'ReadItemQueryAsync({resourceId}, {partitionKey})'.</value>
</data>
<data name="NullTypeMappingInSqlTree" xml:space="preserve">
<value>Expression '{sqlExpression}' in SQL tree does not have type mapping assigned.</value>
<value>The expression '{sqlExpression}' in the SQL tree does not have a type mapping assigned.</value>
</data>
<data name="OffsetRequiresLimit" xml:space="preserve">
<value>Cosmos SQL does not allow Offset without Limit. Consider specifying 'Take' operation on the query.</value>
<value>Cosmos SQL does not allow Offset without Limit. Consider specifying a 'Take' operation on the query.</value>
</data>
<data name="OrphanedNestedDocument" xml:space="preserve">
<value>The entity of type '{entityType}' is mapped as a part of the document mapped to '{missingEntityType}', but there is no tracked entity of this type with the corresponding key value. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the key values.</value>
</data>
<data name="OrphanedNestedDocumentSensitive" xml:space="preserve">
<value>The entity of type '{entityType}' is mapped as a part of the document mapped to '{missingEntityType}', but there is no tracked entity of this type with the key value '{keyValue}'.</value>
<value>The entity of type '{entityType}' is mapped as part of the document mapped to '{missingEntityType}', but there is no tracked entity of this type with the key value '{keyValue}'.</value>
</data>
<data name="ParitionKeyMissing" xml:space="preserve">
<value>Unable to execute a ReadItem query since the partition key value is missing. Consider using 'WithPartitionKey' method on the query to specify partition key to use.</value>
<data name="PartitionKeyMissing" xml:space="preserve">
<value>Unable to execute a 'ReadItem' query since the partition key value is missing. Consider using the 'WithPartitionKey' method on the query to specify partition key to use.</value>
</data>
<data name="PartitionKeyMismatch" xml:space="preserve">
<value>Partition key specified in the WithPartitionKey call '{paritionKey1}' and the partition key specified in the Where predicate '{paritionKey2}' must be identical. Remove one of them .</value>
<value>The partition key specified in the 'WithPartitionKey' call '{partitionKey1}' and the partition key specified in the 'Where' predicate '{partitionKey2}' must be identical. Remove one of them.</value>
</data>
<data name="PartitionKeyMissingProperty" xml:space="preserve">
<value>The partition key for entity type '{entityType}' is set to '{property}', but there is no property with that name.</value>
</data>
<data name="PartitionKeyNonStringStoreType" xml:space="preserve">
<value>The type of the partition key property '{property}' on '{entityType}' is '{propertyType}'. All partition key properties need to be strings or have a string converter.</value>
<value>The type of the partition key property '{property}' on '{entityType}' is '{propertyType}'. All partition key properties need to be strings or have a string value converter.</value>
</data>
<data name="PartitionKeyStoreNameMismatch" xml:space="preserve">
<value>The partition key property '{property1}' on '{entityType1}' is mapped as '{storeName1}', but the partition key property '{property2}' on '{entityType2}' is mapped as '{storeName2}'. All partition key properties need to be mapped to the same store property.</value>
</data>
<data name="ResourceIdMissing" xml:space="preserve">
<value>Unable to execute a ReadItem query since the 'id' value is missing and cannot be generated.</value>
<value>Unable to execute a 'ReadItem' query since the 'id' value is missing and cannot be generated.</value>
</data>
<data name="ReverseAfterSkipTakeNotSupported" xml:space="preserve">
<value>Reversing the ordering in 'SelectExpression' is not supported when limit or offset are already applied.</value>
<value>Reversing the ordering is not supported when limit or offset are already applied.</value>
</data>
<data name="UnableToBindMemberToEntityProjection" xml:space="preserve">
<value>Unable to bind '{memberType}' '{member}' to entity projection of '{entityType}'.</value>
<value>Unable to bind '{memberType}' '{member}' to an entity projection of '{entityType}'.</value>
</data>
<data name="UnsupportedOperatorForSqlExpression" xml:space="preserve">
<value>Unsupported operator '{nodeType}' specified for expression of type '{expressionType}'.</value>
Expand All @@ -219,4 +219,4 @@
<data name="VisitChildrenMustBeOverridden" xml:space="preserve">
<value>'VisitChildren' must be overridden in the class deriving from 'SqlExpression'.</value>
</data>
</root>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public bool MoveNext()

if (!_readItemEnumerable.TryGetPartitionId(out var partitionKey))
{
throw new InvalidOperationException(CosmosStrings.ParitionKeyMissing);
throw new InvalidOperationException(CosmosStrings.PartitionKeyMissing);
}

EntityFrameworkEventSource.Log.QueryExecuting();
Expand Down Expand Up @@ -250,7 +250,7 @@ public async ValueTask<bool> MoveNextAsync()

if (!_readItemEnumerable.TryGetPartitionId(out var partitionKey))
{
throw new InvalidOperationException(CosmosStrings.ParitionKeyMissing);
throw new InvalidOperationException(CosmosStrings.PartitionKeyMissing);
}

EntityFrameworkEventSource.Log.QueryExecuting();
Expand Down
Loading

0 comments on commit 5ff9243

Please sign in to comment.