Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-104

If the property is mapped but getter or setter is missing, it may throw a cryptic error

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.9
    • Affects Version/s: 0.9
    • Component/s: None
    • None

      Unhandled Exception: System.ArgumentNullException: Value cannot be null.
      Parameter name: method
      at System.Linq.Expressions.Expression.ValidateCallArgs(Expression instance, MethodInfo method, ReadOnlyCollection`1& arguments)
      at System.Linq.Expressions.Expression.Call(Expression instance, MethodInfo method, IEnumerable`1 arguments)
      at System.Linq.Expressions.Expression.Call(Expression instance, MethodInfo method, Expression[] arguments)
      at MongoDB.Bson.DefaultSerializer.BsonMemberMap.GetPropertySetter() in C:\workspace\mongodb-mongo-csharp-driver-14c97e4\Bson\Defa
      ultSerializer\BsonMemberMap.cs:line 282
      at MongoDB.Bson.DefaultSerializer.BsonMemberMap.get_Setter() in C:\workspace\mongodb-mongo-csharp-driver-14c97e4\Bson\DefaultSeri
      alizer\BsonMemberMap.cs:line 116
      at MongoDB.Bson.DefaultSerializer.BsonClassMapSerializer.DeserializeMember(BsonReader bsonReader, Object obj, BsonMemberMap membe
      rMap) in C:\workspace\mongodb-mongo-csharp-driver-14c97e4\Bson\DefaultSerializer\BsonClassMapSerializer.cs:line 222
      at MongoDB.Bson.DefaultSerializer.BsonClassMapSerializer.Deserialize(BsonReader bsonReader, Type nominalType, Type actualType) in
      C:\workspace\mongodb-mongo-csharp-driver-14c97e4\Bson\DefaultSerializer\BsonClassMapSerializer.cs:line 94
      at MongoDB.Bson.DefaultSerializer.BsonClassMapSerializer.DeserializeMember(BsonReader bsonReader, Object obj, BsonMemberMap membe
      rMap) in C:\workspace\mongodb-mongo-csharp-driver-14c97e4\Bson\DefaultSerializer\BsonClassMapSerializer.cs:line 220
      at MongoDB.Bson.DefaultSerializer.BsonClassMapSerializer.Deserialize(BsonReader bsonReader, Type nominalType, Type actualType) in
      C:\workspace\mongodb-mongo-csharp-driver-14c97e4\Bson\DefaultSerializer\BsonClassMapSerializer.cs:line 94
      at MongoDB.Bson.DefaultSerializer.BsonClassMapSerializer.Deserialize(BsonReader bsonReader, Type nominalType) in C:\workspace\mon
      godb-mongo-csharp-driver-14c97e4\Bson\DefaultSerializer\BsonClassMapSerializer.cs:line 62
      at MongoDB.Bson.Serialization.BsonSerializer.Deserialize(BsonReader bsonReader, Type nominalType) in C:\workspace\mongodb-mongo-c
      sharp-driver-14c97e4\Bson\Serialization\BsonSerializer.cs:line 70
      at MongoDB.Bson.Serialization.BsonSerializer.Deserialize[T](BsonReader bsonReader) in C:\workspace\mongodb-mongo-csharp-driver-14
      c97e4\Bson\Serialization\BsonSerializer.cs:line 46
      at MongoDB.Driver.Internal.MongoReplyMessage`1.ReadFrom(BsonBuffer buffer) in C:\workspace\mongodb-mongo-csharp-driver-14c97e4\Dr
      iver\Internal\MongoReplyMessage.cs:line 88
      at MongoDB.Driver.Internal.MongoConnection.ReceiveMessage[TDocument]() in C:\workspace\mongodb-mongo-csharp-driver-14c97e4\Driver
      \Internal\MongoConnection.cs:line 313
      at MongoDB.Driver.MongoCursor`2.MongoCursorEnumerator.GetReply(MongoRequestMessage message) in C:\workspace\mongodb-mongo-csharp-
      driver-14c97e4\Driver\Core\MongoCursor.cs:line 488
      at MongoDB.Driver.MongoCursor`2.MongoCursorEnumerator.GetFirst() in C:\workspace\mongodb-mongo-csharp-driver-14c97e4\Driver\Core\
      MongoCursor.cs:line 453

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            testn Testo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: