Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
973a4914
Commit
973a4914
authored
Apr 15, 2020
by
Nick Draper
Browse files
restore what turned out to be a useful boolean value
parent
86d8d3c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Framework/API/src/Algorithm.cpp
View file @
973a4914
...
...
@@ -672,6 +672,10 @@ bool Algorithm::executeInternal() {
if
(
m_alwaysStoreInADS
)
this
->
store
();
// just cache the value internally, it is set at the very end of this
// method
algIsExecuted
=
true
;
// Log that execution has completed.
getLogger
().
debug
(
"Time to validate properties: "
+
...
...
@@ -698,12 +702,13 @@ bool Algorithm::executeInternal() {
}
}
catch
(
std
::
logic_error
&
ex
)
{
m_gcTime
=
Mantid
::
Types
::
Core
::
DateAndTime
::
getCurrentTime
()
+=
(
Mantid
::
Types
::
Core
::
DateAndTime
::
ONE_SECOND
*
DELAY_BEFORE_GC
);
notificationCenter
().
postNotification
(
new
ErrorNotification
(
this
,
ex
.
what
()));
setResultState
(
ResultState
::
Failed
);
this
->
unlockWorkspaces
();
m_gcTime
=
Mantid
::
Types
::
Core
::
DateAndTime
::
getCurrentTime
()
+=
(
Mantid
::
Types
::
Core
::
DateAndTime
::
ONE_SECOND
*
DELAY_BEFORE_GC
);
if
(
m_isChildAlgorithm
||
m_runningAsync
||
m_rethrow
)
throw
;
else
{
...
...
@@ -714,10 +719,10 @@ bool Algorithm::executeInternal() {
}
}
catch
(
CancelException
&
ex
)
{
m_runningAsync
=
false
;
getLogger
().
warning
()
<<
this
->
name
()
<<
": Execution cancelled by user.
\n
"
;
m_gcTime
=
Mantid
::
Types
::
Core
::
DateAndTime
::
getCurrentTime
()
+=
(
Mantid
::
Types
::
Core
::
DateAndTime
::
ONE_SECOND
*
DELAY_BEFORE_GC
);
setResultState
(
ResultState
::
Failed
);
getLogger
().
warning
()
<<
this
->
name
()
<<
": Execution cancelled by user.
\n
"
;
notificationCenter
().
postNotification
(
new
ErrorNotification
(
this
,
ex
.
what
()));
this
->
unlockWorkspaces
();
...
...
@@ -726,16 +731,15 @@ bool Algorithm::executeInternal() {
}
// Gaudi also specifically catches GaudiException & std:exception.
catch
(
std
::
exception
&
ex
)
{
m_runningAsync
=
false
;
getLogger
().
error
()
<<
"Error in execution of algorithm "
<<
this
->
name
()
<<
":
\n
"
<<
ex
.
what
()
<<
"
\n
"
;
m_gcTime
=
Mantid
::
Types
::
Core
::
DateAndTime
::
getCurrentTime
()
+=
(
Mantid
::
Types
::
Core
::
DateAndTime
::
ONE_SECOND
*
DELAY_BEFORE_GC
);
setResultState
(
ResultState
::
Failed
);
m_runningAsync
=
false
;
notificationCenter
().
postNotification
(
new
ErrorNotification
(
this
,
ex
.
what
()));
getLogger
().
error
()
<<
"Error in execution of algorithm "
<<
this
->
name
()
<<
":
\n
"
<<
ex
.
what
()
<<
"
\n
"
;
this
->
unlockWorkspaces
();
throw
;
}
...
...
@@ -760,11 +764,13 @@ bool Algorithm::executeInternal() {
m_gcTime
=
Mantid
::
Types
::
Core
::
DateAndTime
::
getCurrentTime
()
+=
(
Mantid
::
Types
::
Core
::
DateAndTime
::
ONE_SECOND
*
DELAY_BEFORE_GC
);
setResultState
(
ResultState
::
Success
);
// Only gets to here if algorithm ended normally
notificationCenter
().
postNotification
(
new
FinishedNotification
(
this
,
true
));
return
true
;
if
(
algIsExecuted
)
{
setResultState
(
ResultState
::
Success
);
// Only gets to here if algorithm ended normally
notificationCenter
().
postNotification
(
new
FinishedNotification
(
this
,
isExecuted
()));
}
return
isExecuted
();
}
//---------------------------------------------------------------------------------------------
...
...
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