diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 9ecc99cb92f1ac3cb5a68e25595baf3b7c86999c..c6292f027cbf449d34a70fc6fe20d8f71be7b1d9 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -77,6 +77,7 @@ set (COMMON_LIB_SRC_FILES exception/InvalidArgument.cpp exception/InvalidConfigEntry.cpp exception/MissingOperand.cpp + exception/NoEntry.cpp log/DummyLogger.cpp log/LogContext.cpp log/Logger.cpp diff --git a/tapeserver/castor/exception/NoEntry.cpp b/common/exception/NoEntry.cpp similarity index 94% rename from tapeserver/castor/exception/NoEntry.cpp rename to common/exception/NoEntry.cpp index dedebb4c8ce920bfd80a17fcd0c865df77662afa..6e2768b9d629c8bfbb1da4bddca17c629aa175cc 100644 --- a/tapeserver/castor/exception/NoEntry.cpp +++ b/common/exception/NoEntry.cpp @@ -24,11 +24,11 @@ // Include Files #include <errno.h> -#include "castor/exception/NoEntry.hpp" +#include "common/exception/NoEntry.hpp" // ----------------------------------------------------------------------- // Constructor // ----------------------------------------------------------------------- -castor::exception::NoEntry::NoEntry() : +cta::exception::NoEntry::NoEntry() : // No backtrace for this exception cta::exception::Exception("", false) {} diff --git a/tapeserver/castor/exception/NoEntry.hpp b/common/exception/NoEntry.hpp similarity index 96% rename from tapeserver/castor/exception/NoEntry.hpp rename to common/exception/NoEntry.hpp index 3d87726d5c248a3e8eff4b4a04250b2899f7a623..5535161199e415d14f5a772cb59d923c51232fe3 100644 --- a/tapeserver/castor/exception/NoEntry.hpp +++ b/common/exception/NoEntry.hpp @@ -27,7 +27,7 @@ // Include Files #include "common/exception/Exception.hpp" -namespace castor { +namespace cta { namespace exception { @@ -47,5 +47,5 @@ namespace castor { } // end of namespace exception -} // end of namespace castor +} // end of namespace cta diff --git a/tapeserver/castor/common/CastorConfiguration.cpp b/tapeserver/castor/common/CastorConfiguration.cpp index b4aeff3fe8986832f4a8b1eb53c7a513cb6d5f4e..0fb4203cb5a6b4478ca5d74e102340c16440ee25 100644 --- a/tapeserver/castor/common/CastorConfiguration.cpp +++ b/tapeserver/castor/common/CastorConfiguration.cpp @@ -22,7 +22,7 @@ *****************************************************************************/ #include "castor/common/CastorConfiguration.hpp" -#include "castor/exception/NoEntry.hpp" +#include "common/exception/NoEntry.hpp" #include <algorithm> #include <fstream> @@ -220,7 +220,7 @@ const std::string& castor::common::CastorConfiguration::getConfEntString( std::map<std::string, ConfCategory>::const_iterator catIt = m_config.find(category); if (m_config.end() == catIt) { - castor::exception::NoEntry e; + cta::exception::NoEntry e; e.getMessage() << "Failed to get configuration entry " << category << ":" << key << ": Failed to find " << category << " category"; throw e; @@ -228,7 +228,7 @@ const std::string& castor::common::CastorConfiguration::getConfEntString( // get the entry ConfCategory::const_iterator entIt = catIt->second.find(key); if (catIt->second.end() == entIt) { - castor::exception::NoEntry e; + cta::exception::NoEntry e; e.getMessage() << "Failed to get configuration entry " << category << ":" << key << ": Failed to find " << key << " key"; throw e; diff --git a/tapeserver/castor/common/CastorConfiguration.hpp b/tapeserver/castor/common/CastorConfiguration.hpp index 9f42489c74bf0497e72489bdba92bf4bb65111ba..5291cf592c80473bc15209ad10a3a4fe3bd8cda7 100644 --- a/tapeserver/castor/common/CastorConfiguration.hpp +++ b/tapeserver/castor/common/CastorConfiguration.hpp @@ -23,7 +23,7 @@ #pragma once -#include "castor/exception/NoEntry.hpp" +#include "common/exception/NoEntry.hpp" #include "castor/log/Logger.hpp" #include "castor/utils/utils.hpp" #include "common/exception/Exception.hpp" diff --git a/tapeserver/castor/tape/tapeserver/daemon/TapeDaemon.hpp b/tapeserver/castor/tape/tapeserver/daemon/TapeDaemon.hpp index f7144d3204c763c15e551ace35b41b5bfe7fcad1..bce7ed705eb56d6d07a52c13b42cb28829672f49 100644 --- a/tapeserver/castor/tape/tapeserver/daemon/TapeDaemon.hpp +++ b/tapeserver/castor/tape/tapeserver/daemon/TapeDaemon.hpp @@ -25,7 +25,7 @@ #include "castor/common/CastorConfiguration.hpp" #include "common/exception/InvalidConfigEntry.hpp" -#include "castor/exception/NoEntry.hpp" +#include "common/exception/NoEntry.hpp" #include "castor/server/Daemon.hpp" #include "castor/server/ProcessCap.hpp" #include "castor/tape/reactor/ZMQReactor.hpp" diff --git a/tapeserver/castor/utils/CMakeLists.txt b/tapeserver/castor/utils/CMakeLists.txt index eb312bfab501d6ec7e58f18767f76721eaebc3b6..344b5aca6b2ce672994d88bc518c9cb2b74404b6 100644 --- a/tapeserver/castor/utils/CMakeLists.txt +++ b/tapeserver/castor/utils/CMakeLists.txt @@ -30,7 +30,6 @@ set (UTILS_LIB_SRC_FILES CRC.cpp utils.cpp ../common/CastorConfiguration.cpp - ../exception/NoEntry.cpp ../exception/Errnum.cpp ../exception/NotAnOwner.cpp ../exception/NoPortInRange.cpp