Skip to content
Snippets Groups Projects
Commit aae15da3 authored by Steven Murray's avatar Steven Murray
Browse files

Removed dependencies between cta-tape-developer-acs-tools and cta::exception::DismountFailed

parent b99d1496
Branches
Tags
No related merge requests found
......@@ -83,11 +83,11 @@ void cta::mediachanger::acs::AcsDismountCmd::syncDismount() {
requestResponsesUntilFinal(requestSeqNumber, buf, m_cmdLine.queryInterval,
m_cmdLine.timeout);
processDismountResponse(buf);
} catch(cta::exception::Exception &ex) {
cta::exception::DismountFailed df;
df.getMessage() << "Failed to dismount volume " <<
m_cmdLine.volId.external_label << ": " << ex.getMessage().str();
throw df;
} catch(cta::exception::Exception &ne) {
cta::exception::Exception ex;
ex.getMessage() << "Failed to dismount volume " <<
m_cmdLine.volId.external_label << ": " << ne.getMessage().str();
throw ex;
}
}
......@@ -103,7 +103,7 @@ void cta::mediachanger::acs::AcsDismountCmd::sendDismountRequest(
m_cmdLine.libraryDriveSlot, m_cmdLine.force);
m_dbg << "Acs::dismount() returned " << acs_status(s) << std::endl;
if(STATUS_SUCCESS != s) {
cta::exception::DismountFailed ex;
cta::exception::Exception ex;
ex.getMessage() << "Failed to send request to dismount volume " <<
m_cmdLine.volId.external_label << " from drive " <<
m_acs.driveId2Str(m_cmdLine.libraryDriveSlot) << ": force=" <<
......@@ -120,7 +120,7 @@ void cta::mediachanger::acs::AcsDismountCmd::processDismountResponse(
const ACS_DISMOUNT_RESPONSE *const msg = (ACS_DISMOUNT_RESPONSE *)buf;
if(STATUS_SUCCESS != msg->dismount_status) {
cta::exception::DismountFailed ex;
cta::exception::Exception ex;
ex.getMessage() << "Status of dismount response is not success: " <<
acs_status(msg->dismount_status);
throw ex;
......
......@@ -20,7 +20,6 @@
#include "AcsCmd.hpp"
#include "AcsDismountCmdLine.hpp"
#include "common/exception/DismountFailed.hpp"
#include "common/exception/MissingOperand.hpp"
namespace cta {
......@@ -84,8 +83,7 @@ protected:
void sendDismountRequest(const SEQ_NO seqNumber);
/**
* Throws cta::exception::DismountFailed if the mount was not
* successful.
* Process dismount response.
*
* @param buf The mount-response message.
*/
......
......@@ -70,7 +70,6 @@ install(TARGETS ctamediachangeracsunittests DESTINATION usr/${CMAKE_INSTALL_LIBD
message(STATUS "Adding cta-acs-dismount target")
set (ACS_DISMOUNT_SRC_FILES
../../common/exception/Backtrace.cpp
../../common/exception/DismountFailed.cpp
../../common/exception/Exception.cpp
../../common/exception/Mismatch.cpp
../../common/exception/MissingOperand.cpp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment