From 8c6368bcdebd3ca30b275978e365d69bfd8bb415 Mon Sep 17 00:00:00 2001 From: Konstantina Skovola <konstantina.skovola@cern.ch> Date: Fri, 17 May 2024 19:58:28 +0200 Subject: [PATCH] Remove function name from UserError exception messages --- ReleaseNotes.md | 1 + catalogue/rdbms/RdbmsVirtualOrganizationCatalogue.cpp | 2 +- scheduler/OStoreDB/OStoreDB.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 76636a0b18..eb9b22ce02 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -31,6 +31,7 @@ - cta/CTA#575 - Remove rados metrics logging - cta/CTA#675 - Renaming PostgresSchedDB to RelationalDB and introducing rdbms directory model to the Scheduler DB code - cta/CTA#687 - Remove SyslogLogger +- cta/CTA#459 - Remove function name from UserError exception messages # v4.10.10.1-1 / v5.10.10.1-1 diff --git a/catalogue/rdbms/RdbmsVirtualOrganizationCatalogue.cpp b/catalogue/rdbms/RdbmsVirtualOrganizationCatalogue.cpp index adf65d43fd..0134f9ccc3 100644 --- a/catalogue/rdbms/RdbmsVirtualOrganizationCatalogue.cpp +++ b/catalogue/rdbms/RdbmsVirtualOrganizationCatalogue.cpp @@ -327,7 +327,7 @@ std::optional<common::dataStructures::VirtualOrganization> RdbmsVirtualOrganizat virtualOrganization.isRepackVo = rset.columnOptionalBool("IS_REPACK_VO").value_or(false); if(rset.next()){ - throw exception::UserError("In RdbmsCatalogue::getDefaultVirtualOrganizationForRepack() found more that one default Virtual Organization for repack."); + throw exception::UserError("Found more that one default Virtual Organization for repack."); } return virtualOrganization; diff --git a/scheduler/OStoreDB/OStoreDB.cpp b/scheduler/OStoreDB/OStoreDB.cpp index eca469ba1e..61a4366619 100644 --- a/scheduler/OStoreDB/OStoreDB.cpp +++ b/scheduler/OStoreDB/OStoreDB.cpp @@ -2030,7 +2030,7 @@ common::dataStructures::RepackInfo OStoreDB::getRepackInfo(const std::string& vi try { ri.setAddress(re.getRepackIndexAddress()); } catch (cta::exception::Exception& ) { - throw exception::UserError("In OStoreDB::getRepackInfo(): No repack request for this VID (index not present)."); + throw exception::UserError("No repack request for this VID (index not present)."); } ri.fetchNoLock(); auto rrAddresses = ri.getRepackRequestsAddresses(); @@ -2045,7 +2045,7 @@ common::dataStructures::RepackInfo OStoreDB::getRepackInfo(const std::string& vi } catch (cta::exception::Exception& ) {} } } - throw exception::UserError("In OStoreDB::getRepackInfo(): No repack request for this VID."); + throw exception::UserError("No repack request for this VID."); } //------------------------------------------------------------------------------ @@ -3362,7 +3362,7 @@ void OStoreDB::cancelRepack(const std::string& vid, log::LogContext& lc) { try { ri.setAddress(re.getRepackIndexAddress()); } catch (cta::exception::Exception& ) { - throw exception::UserError("In OStoreDB::cancelRepack(): No repack request for this VID (index not present)."); + throw exception::UserError("No repack request for this VID (index not present)."); } ri.fetchNoLock(); auto rrAddresses = ri.getRepackRequestsAddresses(); @@ -3415,7 +3415,7 @@ void OStoreDB::cancelRepack(const std::string& vid, log::LogContext& lc) { } } } - throw exception::UserError("In OStoreDB::cancelRepack(): No repack request for this VID."); + throw exception::UserError("No repack request for this VID."); } //------------------------------------------------------------------------------ -- GitLab