Skip to content
Snippets Groups Projects
Commit 7e960311 authored by Victor Kotlyar's avatar Victor Kotlyar
Browse files

Renamed castor::exception::MemException to

cta::exception::MemException
parent 87cf1cbe
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@
#include "common/exception/Exception.hpp"
#include <string>
namespace castor {
namespace cta {
namespace exception {
/**
* A generic exception thrown when there is something wrong with the memory
......
......@@ -72,7 +72,7 @@ public:
{
castor::server::MutexLocker ml(&m_countersMutex);
if (m_freeBlocksProvided >= m_blocksNeeded) {
throw castor::exception::MemException("DataFifo overflow on free blocks");
throw cta::exception::MemException("DataFifo overflow on free blocks");
}
m_freeBlocksProvided++;
ret = m_freeBlocksProvided < m_blocksNeeded;
......@@ -106,7 +106,7 @@ public:
{
castor::server::MutexLocker ml(&m_countersMutex);
if (m_dataBlocksPushed >= m_blocksNeeded)
throw castor::exception::MemException("DataFifo overflow on data blocks");
throw cta::exception::MemException("DataFifo overflow on data blocks");
}
m_dataBlocks.push(mb);
{
......
......@@ -23,7 +23,7 @@
#include <zlib.h>
#include "castor/tape/tapeserver/file/DiskFile.hpp"
#include "castor/tape/tapeserver/file/File.hpp"
#include "castor/exception/MemException.hpp"
#include "common/exception/MemException.hpp"
#include "common/exception/EndOfFile.hpp"
#pragma once
......@@ -45,7 +45,7 @@ public:
Payload(size_t capacity):
m_data(new (std::nothrow) unsigned char[capacity]),m_totalCapacity(capacity),m_size(0) {
if(NULL == m_data) {
throw castor::exception::MemException("Failed to allocate memory for a new MemBlock!");
throw cta::exception::MemException("Failed to allocate memory for a new MemBlock!");
}
}
......@@ -104,7 +104,7 @@ public:
err << "Trying to read a tape file block with too little space left: BlockSize="
<< from.getBlockSize() << " remainingFreeSpace=" << remainingFreeSpace()
<< " (totalSize=" << m_totalCapacity << ")";
throw castor::exception::MemException(err.str());
throw cta::exception::MemException(err.str());
}
size_t readSize;
try {
......
......@@ -27,7 +27,7 @@
#include "castor/utils/Timer.hpp"
#include "castor/utils/CRC.hpp"
#include "castor/exception/MemException.hpp"
#include "common/exception/MemException.hpp"
namespace castor {
namespace tape {
......@@ -698,7 +698,7 @@ void drive::DriveGeneric::writeBlock(const void * data, size_t count) {
uint8_t * dataWithCrc32c =(new (std::nothrow)
uint8_t [count+SCSI::logicBlockProtectionMethod::CRC32CLength]);
if(NULL == dataWithCrc32c) {
throw castor::exception::MemException("Failed to allocate memory "
throw cta::exception::MemException("Failed to allocate memory "
" for a new MemBlock in DriveGeneric::writeBlock!");
}
memcpy(dataWithCrc32c, data, count);
......@@ -752,7 +752,7 @@ ssize_t drive::DriveGeneric::readBlock(void * data, size_t count) {
uint8_t * dataWithCrc32c =(new (std::nothrow)
uint8_t [count+SCSI::logicBlockProtectionMethod::CRC32CLength]);
if(NULL == dataWithCrc32c) {
throw castor::exception::MemException("In DriveGeneric::readBlock: Failed to allocate memory");
throw cta::exception::MemException("In DriveGeneric::readBlock: Failed to allocate memory");
}
ssize_t res = m_sysWrapper.read(m_tapeFD, dataWithCrc32c,
count+SCSI::logicBlockProtectionMethod::CRC32CLength);
......@@ -812,7 +812,7 @@ void drive::DriveGeneric::readExactBlock(void * data, size_t count, std::string
uint8_t * dataWithCrc32c =(new (std::nothrow)
uint8_t [count+SCSI::logicBlockProtectionMethod::CRC32CLength]);
if(NULL == dataWithCrc32c) {
throw castor::exception::MemException("Failed to allocate memory "
throw cta::exception::MemException("Failed to allocate memory "
" for a new MemBlock in DriveGeneric::readBlock!");
}
ssize_t res = m_sysWrapper.read(m_tapeFD, dataWithCrc32c,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment