Skip to content

Commit 10c43cf

Browse files
committed
CSHARP-3435: Reword error message.
1 parent bfa823b commit 10c43cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MongoDB.Driver/Linq/Linq3Implementation/Translators/ExpressionToFilterTranslators/MethodTranslators/InjectMethodToFilterTranslator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ public static AstFilter Translate(TranslationContext context, MethodCallExpressi
5454
throw new ExpressionNotSupportedException(expression, because: "there is no current root symbol");
5555
}
5656
var documentSerializer = rootSymbol.Serializer;
57-
if (documentSerializer.ValueType != filterDefinitionDocumentType)
57+
if (filterDefinitionDocumentType != documentSerializer.ValueType)
5858
{
59-
throw new ExpressionNotSupportedException(expression, because: $"root document serializer value type {documentSerializer.ValueType} does not match FilterDefinition TDOcument type: {filterDefinitionDocumentType}");
59+
throw new ExpressionNotSupportedException(expression, because: $"FilterDefinition TDocument type: {filterDefinitionDocumentType} does not match document type {documentSerializer.ValueType} ");
6060
}
6161
var serializerRegistry = BsonSerializer.SerializerRegistry;
6262

0 commit comments

Comments
 (0)