[CSHARP-1992] BsonUtils.TryParseHexString should not swallow all exceptions Created: 02/Jun/17 Updated: 28/Oct/23 Resolved: 15/Jun/17 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | BSON |
| Affects Version/s: | 2.4.3 |
| Fix Version/s: | 2.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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. |
| Comments |
| Comment by Githook User [ 15/Jun/17 ] |
|
Author: {u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}Message: |