Throw an exception when converting NaN or Infinity to integral type

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: 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.  
    • None
    • None
    • None
    • None
    • None
    • None

          Assignee:
          Ferdinando Papale
          Reporter:
          Ferdinando Papale
          Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

            Created:
            Updated:
            Resolved: