Skip to content

Commit 0aaebf6

Browse files
authored
CSHARP-4465: Include correct type in exception in BsonTypeMapper.MapToDotNetValue.
1 parent 8334d8d commit 0aaebf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MongoDB.Bson/ObjectModel/BsonTypeMapper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public static object MapToDotNetValue(BsonValue bsonValue, BsonTypeMapperOptions
407407
}
408408
else
409409
{
410-
var message = string.Format("A BsonDocument can't be mapped to a {0}.", BsonUtils.GetFriendlyTypeName(options.MapBsonArrayTo));
410+
var message = string.Format("A BsonDocument can't be mapped to a {0}.", BsonUtils.GetFriendlyTypeName(options.MapBsonDocumentTo));
411411
throw new NotSupportedException(message);
412412
}
413413
case BsonType.Double:

0 commit comments

Comments
 (0)