Open BartNetJS opened 7 years ago
The constructor for ArgumentException requires its second argument to be the name of the invalid argument:
public ArgumentException(
string message,
string paramName
)
https://msdn.microsoft.com/en-us/library/sxykka64(v=vs.110).aspx
You should not pass arbitrary strings here. A better approach would be:
throw new ArgumentException($"Cluster name \"{clusterName}\" could not be found in configuration", nameof(clusterName));
remove quotes from argumentException in CreateConnectionFactory to throw real cluster name