- UDA definitions that have the same name as a core attribute are not
  permitted.
This commit is contained in:
Paul Beckingham
2012-07-05 00:11:54 -04:00
parent d8b0b0f594
commit 5fcc33f1f8
2 changed files with 4 additions and 0 deletions

View File

@@ -173,6 +173,9 @@ void Column::uda (std::map <std::string, Column*>& all)
std::map <std::string, int>::iterator uda;
for (uda = udas.begin (); uda != udas.end (); ++uda)
{
if (all.find (uda->first) != all.end ())
throw format (STRING_UDA_COLLISION, uda->first);
Column* c = Column::uda (uda->first);
all[c->_name] = c;
}

View File

@@ -687,6 +687,7 @@
#define STRING_INFINITE_LOOP "Terminated substitution because more than {1} changes were made - infinite loop protection."
#define STRING_UDA_TYPE "User defined attributes may only be of type 'string', 'date', 'duration' or 'numeric'."
#define STRING_UDA_NUMERIC "The value '{1}' is not a valid numeric value."
#define STRING_UDA_COLLISION "The UDA named '{1}' is the same as a core attribute, and is not permitted."
#define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'."
// Feedback