******************************************************************************/
#include "config/i2-config.hpp"
-#include "config/configitembuilder.hpp"
#include "config/configcompiler.hpp"
#include "config/expression.hpp"
#include "config/applyrule.hpp"
{
if (m_Type.IsEmpty()) {
std::ostringstream msgbuf;
- msgbuf << "The type name of an object may not be empty: " << m_DebugInfo;
- BOOST_THROW_EXCEPTION(std::invalid_argument(msgbuf.str()));
+ msgbuf << "The type name of an object may not be empty";
+ BOOST_THROW_EXCEPTION(ScriptError(msgbuf.str(), m_DebugInfo));
}
if (!DynamicType::GetByName(m_Type)) {
std::ostringstream msgbuf;
- msgbuf << "The type '" + m_Type + "' is unknown: " << m_DebugInfo;
- BOOST_THROW_EXCEPTION(std::invalid_argument(msgbuf.str()));
+ msgbuf << "The type '" + m_Type + "' is unknown";
+ BOOST_THROW_EXCEPTION(ScriptError(msgbuf.str(), m_DebugInfo));
}
if (m_Name.FindFirstOf("!") != String::NPos) {
status = "Object could not be created.";
Array::Ptr errors = new Array();
- BOOST_FOREACH(const boost::exception_ptr& ex, upq.GetExceptions())
- {
+ BOOST_FOREACH(const boost::exception_ptr& ex, upq.GetExceptions()) {
errors->Add(DiagnosticInformation(ex));
}
result1->Set("errors", errors);