BsonUtils.TryParseHexString should not swallow all exceptions

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 2.5
    • Affects Version/s: 2.4.3
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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 Stam
            Reporter:
            Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: