[SERVER-14419] Introduce HostAndPort::parse method Created: 01/Jul/14 Updated: 04/Sep/14 Resolved: 02/Jul/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andy Schwerin | Assignee: | Andy Schwerin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Minor Change |
| Participants: |
| Description |
|
The HostAndPort(String) constructor parses and throws an exception on error. Sometimes, it is helpful to get back a status, instead. Implement StatusWith<HostAndPort> HostAndPort::parse(const StringData&) to provide this behavior. |
| Comments |
| Comment by Andy Schwerin [ 02/Jul/14 ] |
|
Changes error codes and messages when HostAndPort parses fail; messages should generally be more informative. |
| Comment by Githook User [ 02/Jul/14 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: |
| Comment by Githook User [ 02/Jul/14 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: |
| Comment by Githook User [ 02/Jul/14 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: The argument represents a ConnectionString, but we parse it into a HostAndPort |
| Comment by Githook User [ 02/Jul/14 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: The argument represents a ConnectionString, but we parse it into a HostAndPort |
| Comment by Githook User [ 02/Jul/14 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: |