Skip to content

Commit

Permalink
For detailed information in error message. Refs #5306.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Jul 6, 2012
1 parent ee5c067 commit 738a98d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Code/Mantid/Framework/API/src/ParamFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,12 @@ void ParamFunction::setParameter(const std::string& name, const double& value, b
if (it == m_parameterNames.end())
{
std::ostringstream msg;
msg << "ParamFunction parameter ("<<ucName<<") does not exist.";
msg << "ParamFunction (set) parameter ("<<ucName<<") does not exist.";
msg << "\nAllowed parameters: ";
for (size_t ist = 0; ist < m_parameterNames.size(); ++ist)
{
msg << m_parameterNames[ist] << ", ";
}
throw std::invalid_argument(msg.str());
}
setParameter(static_cast<int>(it - m_parameterNames.begin()),value,explicitlySet);
Expand Down

0 comments on commit 738a98d

Please sign in to comment.