BOOST_THROW_EXCEPTION(std::invalid_argument(msgbuf.str()));
}
+ if (m_Name.FindFirstOf("!") != String::NPos) {
+ std::ostringstream msgbuf;
+ msgbuf << "Name for object '" << m_Name << "' of type '" << m_Type << "' is invalid: Object names may not contain '!'";
+ BOOST_THROW_EXCEPTION(ScriptError(msgbuf.str(), m_DebugInfo));
+ }
+
std::vector<Expression *> exprs;
Array::Ptr templateArray = new Array();
}
item->SetType(type);
-
- if (name.FindFirstOf("!") != String::NPos) {
- std::ostringstream msgbuf;
- msgbuf << "Name for object '" << name << "' of type '" << type << "' is invalid: Object names may not contain '!'";
- BOOST_THROW_EXCEPTION(ScriptError(msgbuf.str(), debugInfo));
- }
-
item->SetName(name);
item->AddExpression(new OwnedExpression(expression));