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

BsonUtils.TryParseHexString should not swallow all exceptions

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 2.5
    • 2.4.3
    • BSON
    • None

    Description

      TryParseHexString calls ParseHexString and catches all exceptions and returns false if any exception is thrown by ParseHexString.

      But that swallows exceptions unrelated to parsing like OutOfMemoryException.

      It should only catch FormatExceptions.

      Alternatively, ParseHexString and TryParseHexString could be reimplemented so that no exceptions are ever thrown in the TryParseHexString code path.

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: