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

BsonUtils.TryParseHexString should not swallow all exceptions

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.5
    • Affects Version/s: 2.4.3
    • Component/s: BSON
    • Labels:
      None

      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.

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

              Created:
              Updated:
              Resolved: