Commit b4f8cc31 authored by Zhang, Chen's avatar Zhang, Chen
Browse files

more meaningful deprecated alias message

parent 95304fff
......@@ -45,8 +45,15 @@ void DeprecatedAlias::setDeprecationDate(const std::string &date) {
*/
std::string DeprecatedAlias::deprecationMessage(const IAlgorithm *algo) {
std::stringstream msg;
// TODO: proper deprecation message
msg << "The algorithm '" << algo->name() << "' has been deprecated. ";
auto alias = algo->alias();
if (alias.empty()) {
throw std::runtime_error("Cannot find the deprecated alias for this algorithm.");
} else {
msg << "The algorithm '" << alias << "' is deprecated on " << m_deprecationDate << "."
<< "Please use '" << algo->name() << "' instead.";
}
return msg.str();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment