mongo-csharp-driver icon indicating copy to clipboard operation
mongo-csharp-driver copied to clipboard

Fix: Better error when no constructor found

Open alkampfergit opened this issue 5 years ago • 0 comments

When you have a class in a hierarchy of classes that has no suitable constructor to be desrialized (look also at CSHARP-3186), I got a simple error

An error occurred while deserializing the Nodes property of class xxx.xxxx.ReportDocumentConfigurationValueObject: No matching creator found

The problem is that nodes property of that class can have like 10 concrete classes, and the error is on one specific class. With this patch the error contains the exact class that miss the constructor. This will surely speed up the diagnose of errors.

alkampfergit avatar Aug 14 '20 14:08 alkampfergit