Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
2c82ebb2
Commit
2c82ebb2
authored
Sep 14, 2021
by
Zhang, Chen
Browse files
more meaningful deprecated alias message
parent
eb528918
Changes
1
Hide whitespace changes
Inline
Side-by-side
Framework/API/src/DeprecatedAlias.cpp
View file @
2c82ebb2
...
...
@@ -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
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment