From 229e51db3913ac00cb43f1cea7e9d2e8a1c33361 Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Mon, 11 May 2020 10:52:07 +0200 Subject: [PATCH] Removing additional exception information for better clarity 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 --- Framework/src/ObjectsManager.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Framework/src/ObjectsManager.cxx b/Framework/src/ObjectsManager.cxx index af986bcb71..ea0ff997a9 100644 --- a/Framework/src/ObjectsManager.cxx +++ b/Framework/src/ObjectsManager.cxx @@ -90,7 +90,12 @@ void ObjectsManager::stopPublishing(const string& name) { auto* mo = dynamic_cast(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); } @@ -102,7 +107,12 @@ MonitorObject* ObjectsManager::getMonitorObject(std::string objectName) if (mo != nullptr) { return dynamic_cast(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()); } }