Skip to content
Snippets Groups Projects
Commit 8daf40a4 authored by Charles Leggett's avatar Charles Leggett
Browse files

Data object handle demangle name in error

Small improvement to `DataObjectHandle` to use System::typeinfoName to extract the type when issuing a mis-match error message. Results in the type being de-mangled from something like

```
ERROR The type provided for /Event/Rec/Track/BestRichDown is 14AnyDataWrapperIN5Gaudi6Range_ISt6vectorIPKN4LHCb5TrackESaIS6_EEN9__gnu_cxx17__normal_iteratorIPKS6_S8_EEEEE and is different form the one of the object in the store.
```

to

```
ERROR The type provided for /Event/Rec/Track/BestRichDown is AnyDataWrapper<Gaudi::Range_<std::vector<LHCb::Track const*,std::allocator<LHCb::Track const*> >,__gnu_cxx::__normal_iterator<LHCb::Track const* const*,std::vector<LHCb::Track const*,std::allocator<LHCb::Track const*> > > > > and is different from the one of the object in the store.
```

Chris

See merge request !272
parents 675b4679 e8b2a8bc
No related branches found
No related tags found
1 merge request!272Data object handle demangle name in error
Pipeline #
......@@ -95,8 +95,8 @@ T* DataObjectHandle<T>::get(bool mustExist) const {
if (UNLIKELY(!m_goodType)) {
std::string errorMsg("The type provided for "+ objKey()
+ " is " + typeid(T).name()
+ " and is different form the one of the object in the store.");
+ " is " + System::typeinfoName(typeid(T))
+ " and is different from the one of the object in the store.");
//log << MSG::ERROR << errorMsg << endmsg;
throw GaudiException (errorMsg,"Wrong DataObjectType",StatusCode::FAILURE);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment