diff --git a/src/columns/Column.cpp b/src/columns/Column.cpp index 4c4069fe8..f96e731d2 100644 --- a/src/columns/Column.cpp +++ b/src/columns/Column.cpp @@ -183,6 +183,8 @@ Column* Column::uda (const std::string& name) std::string key = "uda." + name + ".type"; c->_type = context.config.get (key); + if (c->_type == "") + throw format (STRING_UDA_TYPE_MISSING, name); if (c->_type != "string" && c->_type != "date" && c->_type != "duration" && diff --git a/src/en-US.h b/src/en-US.h index 9e5d2d1c4..0e852177a 100644 --- a/src/en-US.h +++ b/src/en-US.h @@ -685,6 +685,7 @@ #define STRING_ASSUME_INFO "No command specified - assuming 'information'." #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_TYPE_MISSING "uda.{1}.type not found. The UDA '{1}' must have a type specified." #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}'."