Throw an error if ToolHandle unable to cast to appropriate interface
In Athena, I have a ToolHandle declared like this:
ToolHandle<Trk::ITimedExtrapolator> m_extrapolator;
which was failing in the initialise step of the parent service here:
if (!m_extrapolator.empty() && m_extrapolator.retrieve().isFailure()) return StatusCode::FAILURE;
acode-browser1.usatlas.bnl.gov/lxr/source/athena/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvc.cxx
I'd just made a simple error: in the configuration I'd given the handle a tool with the wrong interface (IExtrapolator rather than ITimedExtrapolator). However, I didn't get any helpful error output, just this failure.
@leggett suggested I open a ticket - could this error be caught, handled or reported better?
Regards, Ben