Ticket #2319 (closed: fixed)
Add an IAlgorithm method to easily run sub-algs
| Reported by: | Mathieu Doucet | Owned by: | Mathieu Doucet |
|---|---|---|---|
| Priority: | trivial | Milestone: | Iteration 27 |
| Component: | Mantid | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: | Tester: | Janik Zikovsky |
Description
Add a utility method so that we don't have to write the following code each time an Algorithm runs a sub-algorithm:
// Now execute the sub-algorithm. Catch and log any error
try
{
childAlg->execute();
}
catch (std::runtime_error&)
{
g_log.error("Unable to successfully run Linear fit sub-algorithm");
throw;
}
if ( ! childAlg->isExecuted() )
{
g_log.error("Unable to successfully run Linear fit sub-algorithm");
throw std::runtime_error("Unable to successfully run Linear fit sub-algorithm");
}
Change History
comment:2 Changed 10 years ago by Mathieu Doucet
- Status changed from accepted to verify
- Resolution set to fixed
comment:3 Changed 10 years ago by Janik Zikovsky
- Status changed from verify to verifying
- Tester set to Janik Zikovsky
Note: See
TracTickets for help on using
tickets.
