[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:
Duplicate
duplicates SERVER-18567 ConnectionString::parse should return... Closed
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 SERVER-18567.

Generated at Thu Feb 08 03:18:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.