Skip to content

Commit 3dbc904

Browse files
alkampfergitOleksandr Poliakov
authored and
Oleksandr Poliakov
committed
Fix: Better error when no constructor found
1 parent 2803f87 commit 3dbc904

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MongoDB.Bson/Serialization/Serializers/BsonClassMapSerializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ private BsonCreatorMap ChooseBestCreator(Dictionary<string, object> values)
414414

415415
if (creatorMap == null)
416416
{
417-
throw new BsonSerializationException("No matching creator found.");
417+
throw new BsonSerializationException($"No matching creator found for class {_classMap.ClassType.FullName}.");
418418
}
419419

420420
return creatorMap;

0 commit comments

Comments
 (0)