Skip to content

Commit b86ec73

Browse files
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
1 parent fa7f305 commit b86ec73

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Framework/src/ObjectsManager.cxx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,12 @@ void ObjectsManager::stopPublishing(const string& name)
9090
{
9191
auto* mo = dynamic_cast<MonitorObject*>(mMonitorObjects->FindObject(name.data()));
9292
if (mo == nullptr) {
93-
BOOST_THROW_EXCEPTION(ObjectNotFoundError() << errinfo_object_name(name));
93+
// TODO: ideally we want to pass the object name to the exception but the implementation
94+
// of AliceO2::Common::ObjectNotFoundError drops additional information. For clarity we
95+
// better skip
96+
// << errinfo_object_name(name));
97+
// until this is fixed
98+
BOOST_THROW_EXCEPTION(ObjectNotFoundError();
9499
}
95100
mMonitorObjects->Remove(mo);
96101
}
@@ -102,7 +107,12 @@ MonitorObject* ObjectsManager::getMonitorObject(std::string objectName)
102107
if (mo != nullptr) {
103108
return dynamic_cast<MonitorObject*>(mo);
104109
} else {
105-
BOOST_THROW_EXCEPTION(ObjectNotFoundError() << errinfo_object_name(objectName));
110+
// TODO: ideally we want to pass the object name to the exception but the implementation
111+
// of AliceO2::Common::ObjectNotFoundError drops additional information. For clarity we
112+
// better skip
113+
// << errinfo_object_name(objectName));
114+
// until this is fixed
115+
BOOST_THROW_EXCEPTION(ObjectNotFoundError();
106116
}
107117
}
108118

0 commit comments

Comments
 (0)