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

AcsCmdLine::parseQueryInterval() now throws InvalidQueryInterval instead of InvalidAgument

parent ba5adba1
No related branches found
No related tags found
No related merge requests found
......@@ -134,7 +134,7 @@ bool cta::mediachanger::acs::AcsCmdLine::onlyContainsNumerals(const std::string
int cta::mediachanger::acs::AcsCmdLine::parseQueryInterval(const std::string &s) {
const int queryInterval = atoi(s.c_str());
if(0 >= queryInterval) {
cta::exception::InvalidArgument ex;
InvalidQueryInterval ex;
ex.getMessage() << "Query value must be an integer greater than 0"
": value=" << queryInterval;
throw ex;
......
......@@ -57,10 +57,19 @@ public:
protected:
/**
* Invalid query interval.
*/
struct InvalidQueryInterval: public exception::Exception {
InvalidQueryInterval(const std::string &context = "", const bool embedBacktrace = true):
cta::exception::Exception(context, embedBacktrace) {}
};
/**
* Parses the specified query interval.
*
* @return The parse query interval.
* @throw InvalidQueryInterval if the query interval is invalid.
*/
int parseQueryInterval(const std::string &s);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment