private string ParseAndScrubErrorMessage(string message)
{
if (string.IsNullOrEmpty(message) == false)
{
StringBuilder scrubbedMessage = new StringBuilder(message);
ScrubMessagePrivateInfo(scrubbedMessage, _localPathsMatcher);
ScrubMessagePrivateInfo(scrubbedMessage, _networkPathsMatcher);
ScrubMessagePrivateInfo(scrubbedMessage, _protocolsMatcher);
ScrubMessagePrivateInfo(scrubbedMessage, _identifierMatcher);
// return scrubbed message with all other information intact
return scrubbedMessage.ToString();
}
// return generic error message
return "Error message was empty or null.";
}