From 457292b397bd0407e2e53c1d54f58764091b555c Mon Sep 17 00:00:00 2001
From: Cedric CAFFY <cedric.caffy@cern.ch>
Date: Thu, 30 Jan 2020 13:54:59 +0100
Subject: [PATCH] The frontend will log an error message in the
 cta-frontend.log file if the catalogue MAJOR schema version number mismatch
 and rethrow the exception to the XrdSsiCtaServiceProvider

---
 xroot_plugins/XrdSsiCtaServiceProvider.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/xroot_plugins/XrdSsiCtaServiceProvider.cpp b/xroot_plugins/XrdSsiCtaServiceProvider.cpp
index bb2f58de6a..b32aa5ed0b 100644
--- a/xroot_plugins/XrdSsiCtaServiceProvider.cpp
+++ b/xroot_plugins/XrdSsiCtaServiceProvider.cpp
@@ -123,7 +123,13 @@ void XrdSsiCtaServiceProvider::ExceptionThrowingInit(XrdSsiLogger *logP, XrdSsiC
      auto catalogueFactory = catalogue::CatalogueFactoryFactory::create(*m_log, catalogueLogin,
        catalogue_numberofconnections.second, nbArchiveFileListingConns);
      m_catalogue = catalogueFactory->create();
-     m_catalogue->ping();
+     try{
+      m_catalogue->ping();
+     } catch(cta::exception::Exception& ex){
+       log::LogContext lc(*m_log);
+       lc.log(cta::log::ERR,ex.getMessageValue());
+       throw ex;
+     }
    }
 
    // Initialise the Backend
-- 
GitLab