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

Throw an exception when converting NaN or Infinity to integral type

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.0.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Major Change
    • Dotnet Drivers
    • Needed
    • Hide

      Trying to serialize a floating point infinity or NaN value (like double.Infinity or Decimal128.qNaN) with an integral representaiton (like BsonType.Int64) will now throw an OverflowException. 
      Same when trying to deserialize an infinity or NaN value.  

      Show
      Trying to serialize a floating point infinity or NaN value (like double.Infinity or Decimal128.qNaN) with an integral representaiton (like BsonType.Int64) will now throw an OverflowException.  Same when trying to deserialize an infinity or NaN value.  

          Assignee:
          ferdinando.papale@mongodb.com Ferdinando Papale
          Reporter:
          ferdinando.papale@mongodb.com Ferdinando Papale
          Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

            Created:
            Updated:
            Resolved: