protected void Error_NameCollision(ISourceLocation site, NameCollisionException exception) { // Build type string StringBuilder sb = new StringBuilder(); sb.Append(AttributeHelpers.GetTypeName(exception.Types[0]).ToLower() + "s"); for (int i = 1; i < exception.Types.Length - 1; i++) sb.Append(", " + AttributeHelpers.GetTypeName(exception.Types[i]).ToLower() + "s"); if (exception.Types.Length > 1) sb.Append(" or " + AttributeHelpers.GetTypeName(exception.Types[exception.Types.Length - 1]).ToLower() + "s"); errorReporter.Error(site, "\"{1}\" can refer to multiple {0}. Remove unused usings or prefix the name with namespace qualifier.", sb.ToString(), exception.Name); }
protected void Error_NameExists(ISourceLocation site, NameCollisionException exception) { // Build type string StringBuilder sb = new StringBuilder(); sb.Append(AttributeHelpers.GetTypeName(exception.Types[0]).ToLower()); for (int i = 1; i < exception.Types.Length - 1; i++) sb.Append(", " + AttributeHelpers.GetTypeName(exception.Types[i]).ToLower()); if (exception.Types.Length > 1) sb.Append(" or " + AttributeHelpers.GetTypeName(exception.Types[exception.Types.Length - 1]).ToLower()); errorReporter.Error(site, "A {0} with name \"{1}\" already exists.", sb.ToString(), exception.Name); }
protected void Error_NameExists(SoaObject site, NameCollisionException exception) { Error_NameExists(site.GetMetaInfo<SourceLocationInfo>(), exception); }
protected void Error_NameRedefinition(ISourceLocation site, NameCollisionException exception) { errorReporter.Error(site, "Redefinition of inherited {0} \"{1}\".", AttributeHelpers.GetTypeName(exception.Types[0]).ToLower(), exception.Name); }