[SERVER-8980] ConnectionString::parse on some invalid input throws exception, on others returns an invalid ConnectionString Created: 14/Mar/13 Updated: 11/Jun/15 Resolved: 11/Jun/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Andy Schwerin |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
ConnectionString::parse will return an empty ConnectionString (which will return false on calls to isValid()) on certain kinds of invalid input. It also, however, calls the HostAndPort constructor, which can throw an exception on invalid input (and prints a stack trace). This means that ConnectionString::parse has inconsistent behavior on invalid input. The simple approach of catching the exception thrown by HostAndPort() would work, but still presents a user experience problem as a stack trace will still print for the error thrown. |
| Comments |
| Comment by Andy Schwerin [ 11/Jun/15 ] |
|
Resolved as side-effect of |