From da9b226ced419cd48c3bd8be4f3f0459c36cabb5 Mon Sep 17 00:00:00 2001 From: Steven Murray <Steven.Murray@cern.ch> Date: Sun, 14 Oct 2018 23:40:16 +0200 Subject: [PATCH] Removed dependencies between cta-tape-developer-acs-tools and cta::exception::MissingOperand --- mediachanger/acs/AcsDismountCmd.hpp | 1 - mediachanger/acs/AcsDismountCmdLine.cpp | 3 +-- mediachanger/acs/AcsMountCmd.hpp | 1 - mediachanger/acs/AcsMountCmdLine.cpp | 3 +-- mediachanger/acs/AcsQueryDriveCmd.hpp | 1 - mediachanger/acs/AcsQueryDriveCmdLine.cpp | 3 +-- mediachanger/acs/AcsQueryVolumeCmd.hpp | 2 -- mediachanger/acs/AcsQueryVolumeCmdLine.cpp | 3 +-- mediachanger/acs/CMakeLists.txt | 4 ---- 9 files changed, 4 insertions(+), 17 deletions(-) diff --git a/mediachanger/acs/AcsDismountCmd.hpp b/mediachanger/acs/AcsDismountCmd.hpp index 3d8fa5e5b9..43a4c5e606 100644 --- a/mediachanger/acs/AcsDismountCmd.hpp +++ b/mediachanger/acs/AcsDismountCmd.hpp @@ -20,7 +20,6 @@ #include "AcsCmd.hpp" #include "AcsDismountCmdLine.hpp" -#include "common/exception/MissingOperand.hpp" namespace cta { namespace mediachanger { diff --git a/mediachanger/acs/AcsDismountCmdLine.cpp b/mediachanger/acs/AcsDismountCmdLine.cpp index 00d90b1ad5..42c0058a37 100644 --- a/mediachanger/acs/AcsDismountCmdLine.cpp +++ b/mediachanger/acs/AcsDismountCmdLine.cpp @@ -20,7 +20,6 @@ #include "AcsCmdLine.hpp" #include "AcsDismountCmdLine.hpp" #include "Constants.hpp" -#include "common/exception/MissingOperand.hpp" #include <getopt.h> #include <stdlib.h> @@ -86,7 +85,7 @@ cta::mediachanger::acs::AcsDismountCmdLine::AcsDismountCmdLine(const int argc, // Check that both VID and DRIVE_SLOT have been specified if(nbArgs < 2) { - cta::exception::MissingOperand ex; + cta::exception::Exception ex; ex.getMessage() << "Both VID and DRIVE_SLOT must be specified"; diff --git a/mediachanger/acs/AcsMountCmd.hpp b/mediachanger/acs/AcsMountCmd.hpp index aa91b1a6f1..2c142888e2 100644 --- a/mediachanger/acs/AcsMountCmd.hpp +++ b/mediachanger/acs/AcsMountCmd.hpp @@ -20,7 +20,6 @@ #include "AcsCmd.hpp" #include "AcsMountCmdLine.hpp" -#include "common/exception/MissingOperand.hpp" #include <stdint.h> diff --git a/mediachanger/acs/AcsMountCmdLine.cpp b/mediachanger/acs/AcsMountCmdLine.cpp index 67e7e0c545..b73f34ddb1 100644 --- a/mediachanger/acs/AcsMountCmdLine.cpp +++ b/mediachanger/acs/AcsMountCmdLine.cpp @@ -19,7 +19,6 @@ #include "Acs.hpp" #include "AcsMountCmdLine.hpp" #include "Constants.hpp" -#include "common/exception/MissingOperand.hpp" #include <getopt.h> #include <stdlib.h> @@ -85,7 +84,7 @@ cta::mediachanger::acs::AcsMountCmdLine::AcsMountCmdLine(const int argc, // Check that both VID and DRIVE_SLOT have been specified if(nbArgs < 2) { - cta::exception::MissingOperand ex; + cta::exception::Exception ex; ex.getMessage() << "Both VID and DRIVE_SLOT must be specified"; throw ex; } diff --git a/mediachanger/acs/AcsQueryDriveCmd.hpp b/mediachanger/acs/AcsQueryDriveCmd.hpp index d4c012c8f5..2463a16323 100644 --- a/mediachanger/acs/AcsQueryDriveCmd.hpp +++ b/mediachanger/acs/AcsQueryDriveCmd.hpp @@ -20,7 +20,6 @@ #include "AcsCmd.hpp" #include "AcsQueryDriveCmdLine.hpp" -#include "common/exception/MissingOperand.hpp" #include "mediachanger/CmdLineTool.hpp" #include <stdint.h> diff --git a/mediachanger/acs/AcsQueryDriveCmdLine.cpp b/mediachanger/acs/AcsQueryDriveCmdLine.cpp index f7022bb16c..e48c347b9f 100644 --- a/mediachanger/acs/AcsQueryDriveCmdLine.cpp +++ b/mediachanger/acs/AcsQueryDriveCmdLine.cpp @@ -20,7 +20,6 @@ #include "Acs.hpp" #include "AcsQueryDriveCmdLine.hpp" #include "Constants.hpp" -#include "common/exception/MissingOperand.hpp" #include <getopt.h> #include <stdlib.h> #include <string.h> @@ -83,7 +82,7 @@ cta::mediachanger::acs::AcsQueryDriveCmdLine::AcsQueryDriveCmdLine(const int arg // Check that DRIVE_SLOT has been specified if(1 > nbArgs) { - cta::exception::MissingOperand ex; + cta::exception::Exception ex; ex.getMessage() << "DRIVE_SLOT must be specified"; throw ex; } diff --git a/mediachanger/acs/AcsQueryVolumeCmd.hpp b/mediachanger/acs/AcsQueryVolumeCmd.hpp index 6c83558ba5..9221d96cbb 100644 --- a/mediachanger/acs/AcsQueryVolumeCmd.hpp +++ b/mediachanger/acs/AcsQueryVolumeCmd.hpp @@ -20,8 +20,6 @@ #include "AcsCmd.hpp" #include "AcsQueryVolumeCmdLine.hpp" -#include "common/exception/MissingOperand.hpp" - #include <stdint.h> diff --git a/mediachanger/acs/AcsQueryVolumeCmdLine.cpp b/mediachanger/acs/AcsQueryVolumeCmdLine.cpp index 98029595ac..375112ad50 100644 --- a/mediachanger/acs/AcsQueryVolumeCmdLine.cpp +++ b/mediachanger/acs/AcsQueryVolumeCmdLine.cpp @@ -20,7 +20,6 @@ #include "Acs.hpp" #include "AcsQueryVolumeCmdLine.hpp" #include "Constants.hpp" -#include "common/exception/MissingOperand.hpp" #include <getopt.h> #include <stdlib.h> @@ -76,7 +75,7 @@ cta::mediachanger::acs::AcsQueryVolumeCmdLine::AcsQueryVolumeCmdLine(const int a // Check that VID has been specified if(nbArgs < 1) { - cta::exception::MissingOperand ex; + cta::exception::Exception ex; ex.getMessage() << "VID must be specified"; throw ex; } diff --git a/mediachanger/acs/CMakeLists.txt b/mediachanger/acs/CMakeLists.txt index 20aa23f3a0..aee2460638 100644 --- a/mediachanger/acs/CMakeLists.txt +++ b/mediachanger/acs/CMakeLists.txt @@ -72,7 +72,6 @@ set (ACS_DISMOUNT_SRC_FILES ../../common/exception/Backtrace.cpp ../../common/exception/Exception.cpp ../../common/exception/Mismatch.cpp - ../../common/exception/MissingOperand.cpp ../../common/exception/RequestFailed.cpp Acs.cpp AcsCmd.cpp @@ -99,7 +98,6 @@ set (ACS_MOUNT_SRC_FILES ../../common/exception/Backtrace.cpp ../../common/exception/Exception.cpp ../../common/exception/Mismatch.cpp - ../../common/exception/MissingOperand.cpp ../../common/exception/RequestFailed.cpp Acs.cpp AcsCmd.cpp @@ -127,7 +125,6 @@ set (ACS_QUERYVOLUME_SRC_FILES ../../common/exception/Backtrace.cpp ../../common/exception/Exception.cpp ../../common/exception/Mismatch.cpp - ../../common/exception/MissingOperand.cpp ../../common/exception/RequestFailed.cpp Acs.cpp AcsCmd.cpp @@ -157,7 +154,6 @@ set (ACS_QUERYDRIVE_SRC_FILES ../../common/exception/Backtrace.cpp ../../common/exception/Exception.cpp ../../common/exception/Mismatch.cpp - ../../common/exception/MissingOperand.cpp ../../common/exception/RequestFailed.cpp Acs.cpp AcsCmd.cpp -- GitLab