Skip to content

Commit

Permalink
Removing additional exception information for better clarity
Browse files Browse the repository at this point in the history
Implementation of of AliceO2::Common::ObjectNotFoundError drops additional
information and for clarity we better skip writing more details into the
exception until this is fixed.

https://github.com/AliceO2Group/Common/blob/3f92059e08f191ce6c65a5a9a119e5aba02b89ec/include/Common/Exceptions.h#L28
  • Loading branch information
matthiasrichter committed May 11, 2020
1 parent fa7f305 commit b86ec73
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Framework/src/ObjectsManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ void ObjectsManager::stopPublishing(const string& name)
{
auto* mo = dynamic_cast<MonitorObject*>(mMonitorObjects->FindObject(name.data()));
if (mo == nullptr) {
BOOST_THROW_EXCEPTION(ObjectNotFoundError() << errinfo_object_name(name));
// TODO: ideally we want to pass the object name to the exception but the implementation
// of AliceO2::Common::ObjectNotFoundError drops additional information. For clarity we
// better skip
// << errinfo_object_name(name));
// until this is fixed
BOOST_THROW_EXCEPTION(ObjectNotFoundError();
}
mMonitorObjects->Remove(mo);
}
Expand All @@ -102,7 +107,12 @@ MonitorObject* ObjectsManager::getMonitorObject(std::string objectName)
if (mo != nullptr) {
return dynamic_cast<MonitorObject*>(mo);
} else {
BOOST_THROW_EXCEPTION(ObjectNotFoundError() << errinfo_object_name(objectName));
// TODO: ideally we want to pass the object name to the exception but the implementation
// of AliceO2::Common::ObjectNotFoundError drops additional information. For clarity we
// better skip
// << errinfo_object_name(objectName));
// until this is fixed
BOOST_THROW_EXCEPTION(ObjectNotFoundError();
}
}

Expand Down

0 comments on commit b86ec73

Please sign in to comment.