From f810618a9f054ea14e354eab7cda76758c69fb4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barth=C3=A9l=C3=A9my=20von=20Haller?= Date: Mon, 23 Sep 2024 11:30:11 +0200 Subject: [PATCH] More info when failing a cast --- Framework/src/CcdbDatabase.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Framework/src/CcdbDatabase.cxx b/Framework/src/CcdbDatabase.cxx index 0cd819ee0d..a4a98307dc 100644 --- a/Framework/src/CcdbDatabase.cxx +++ b/Framework/src/CcdbDatabase.cxx @@ -359,7 +359,7 @@ std::shared_ptr CcdbDatabase::retrieve // The object is either in a TFile or is a blob but it was stored with storeAsTFile as a full MO mo.reset(dynamic_cast(obj)); if (mo == nullptr) { - ILOG(Error, Devel) << "Could not cast the object " << fullPath << " to MonitorObject" << ENDM; + ILOG(Error, Devel) << "Could not cast the object " << fullPath << " to MonitorObject (objectVersion: " << objectVersion << ")" << ENDM; return nullptr; } } else { @@ -386,7 +386,7 @@ std::shared_ptr CcdbDatabase::retrieve } std::shared_ptr qo(dynamic_cast(obj)); if (qo == nullptr) { - ILOG(Error, Devel) << "Could not cast the object " << fullPath << " to QualityObject" << ENDM; + ILOG(Error, Devel) << "Could not cast the object " << fullPath << " to QualityObject (objectVersion: " << objectVersion << ")" << ENDM; } else { // TODO should we remove the headers we know are general such as ETag and qc_task_name ? qo->addMetadata(headers);