Skip to content

Commit

Permalink
Re #6190. Beefed up error message for deprecated algorithms.
Browse files Browse the repository at this point in the history
Sorry, but throwing an exception when the developer didn't specify an
alternate algorithm doesn't always make sense. Sometimes an algorithm
just get dropped from the list of things mantid does.
  • Loading branch information
peterfpeterson committed Jan 22, 2013
1 parent 9c3fc52 commit 8b93b36
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Code/Mantid/Framework/API/src/DeprecatedAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ namespace API
if (!this->m_deprecatdDate.empty())
msg << " (on " << this->m_deprecatdDate << ")";

if (!this->m_replacementAlgorithm.empty())
msg << ". Use " << this->m_replacementAlgorithm << " instead." << std::endl;
if (this->m_replacementAlgorithm.empty())
{
msg << " and has no replacement.";
}
else
{
msg << ". Use " << this->m_replacementAlgorithm << " instead.";
}

return msg.str();
}
Expand Down

0 comments on commit 8b93b36

Please sign in to comment.