private string GetFormattedErrorMessage(
string fileName,
int line,
int column,
bool isWarning,
string errorNumber,
string errorText)
{
string errorCode = isWarning ? this.WarningString : this.ErrorString;
StringBuilder message = new StringBuilder();
if (!string.IsNullOrEmpty(fileName))
{
message.AppendFormat(CultureInfo.CurrentCulture, "{0}({1},{2}):", fileName, line, column);
}
message.AppendFormat(CultureInfo.CurrentCulture, " {0} {1}: {2}", errorCode, errorNumber, errorText);
message.AppendLine();
return message.ToString();
}