diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 2eda45f8eb1069993d5a08fcf2c0854ccd3fddd5..7a069a0f3b9c87722cf34cf54ef9fa0c5b0b5e41 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -80,6 +80,7 @@ set (COMMON_LIB_SRC_FILES exception/NoEntry.cpp exception/NoPortInRange.cpp exception/NotAnOwner.cpp + exception/OutOfMemory.cpp log/DummyLogger.cpp log/LogContext.cpp log/Logger.cpp diff --git a/tapeserver/castor/exception/OutOfMemory.cpp b/common/exception/OutOfMemory.cpp similarity index 93% rename from tapeserver/castor/exception/OutOfMemory.cpp rename to common/exception/OutOfMemory.cpp index c3937dca0e0911063750b6508eb9c212680d015e..9c829acadb8cec5ea841ed9dc40d4f8d3b42dbb0 100644 --- a/tapeserver/castor/exception/OutOfMemory.cpp +++ b/common/exception/OutOfMemory.cpp @@ -24,10 +24,10 @@ // Include Files #include <errno.h> -#include "castor/exception/OutOfMemory.hpp" +#include "common/exception/OutOfMemory.hpp" // ----------------------------------------------------------------------- // Constructor // ----------------------------------------------------------------------- -castor::exception::OutOfMemory::OutOfMemory() : +cta::exception::OutOfMemory::OutOfMemory() : cta::exception::Exception() {} diff --git a/tapeserver/castor/exception/OutOfMemory.hpp b/common/exception/OutOfMemory.hpp similarity index 96% rename from tapeserver/castor/exception/OutOfMemory.hpp rename to common/exception/OutOfMemory.hpp index cab718f24f4f31779371b945ba1b8e38b78560b1..0adc2af62fa2cf550493a29a32c41d0d478bbc5c 100644 --- a/tapeserver/castor/exception/OutOfMemory.hpp +++ b/common/exception/OutOfMemory.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/System.cpp b/tapeserver/castor/System.cpp index 12067fadb1cccfa65c0175d1be0fbf95fb3c2a12..a78bb464a5e3c3143249a8ebb881a606870bdf81 100644 --- a/tapeserver/castor/System.cpp +++ b/tapeserver/castor/System.cpp @@ -34,7 +34,7 @@ // Local includes #include "System.hpp" -#include "castor/exception/OutOfMemory.hpp" +#include "common/exception/OutOfMemory.hpp" #define STAGERSUPERGROUP "st" #define STAGERSUPERUSER "stage" @@ -50,7 +50,7 @@ std::string castor::System::getHostName() char* hostname; hostname = (char*) calloc(len, 1); if (0 == hostname) { - castor::exception::OutOfMemory ex; + cta::exception::OutOfMemory ex; ex.getMessage() << "Could not allocate hostname with length " << len; throw ex; } diff --git a/tapeserver/castor/utils/CMakeLists.txt b/tapeserver/castor/utils/CMakeLists.txt index 211c28e92b1c1ea6fa146c3484335bb833630256..bad107984d4bbe2a76561d77056d8628addfa409 100644 --- a/tapeserver/castor/utils/CMakeLists.txt +++ b/tapeserver/castor/utils/CMakeLists.txt @@ -32,7 +32,6 @@ set (UTILS_LIB_SRC_FILES ../common/CastorConfiguration.cpp ../exception/Errnum.cpp ../exception/TimeOut.cpp - ../exception/OutOfMemory.cpp ../BaseObject.cpp ../Services.cpp ../Factories.cpp