Commit 083db8da authored by Steven Murray's avatar Steven Murray
Browse files

Replaced userError variable with more specific cmdLineNotParsed

parent 617846f2
......@@ -38,14 +38,14 @@ static int exceptionThrowingMain(const int argc, char *const *const argv);
int main(const int argc, char *const *const argv) {
using namespace cta;
bool userError = false;
bool cmdLineNotParsed = false;
std::string errorMessage;
try {
return exceptionThrowingMain(argc, argv);
} catch(exception::CommandLineNotParsed &ue) {
errorMessage = ue.getMessage().str();
userError = true;
cmdLineNotParsed = true;
} catch(exception::Exception &ex) {
errorMessage = ex.getMessage().str();
} catch(std::exception &se) {
......@@ -58,7 +58,7 @@ int main(const int argc, char *const *const argv) {
// and errorMessage has been set accordingly
std::cerr << "Aborting: " << errorMessage << std::endl;
if(userError) {
if(cmdLineNotParsed) {
std::cerr << std::endl;
catalogue::CreateAdminHostCmdLineArgs::printUsage(std::cerr);
}
......
......@@ -38,14 +38,14 @@ static int exceptionThrowingMain(const int argc, char *const *const argv);
int main(const int argc, char *const *const argv) {
using namespace cta;
bool userError = false;
bool cmdLineNotParsed = false;
std::string errorMessage;
try {
return exceptionThrowingMain(argc, argv);
} catch(exception::CommandLineNotParsed &ue) {
errorMessage = ue.getMessage().str();
userError = true;
cmdLineNotParsed = true;
} catch(exception::Exception &ex) {
errorMessage = ex.getMessage().str();
} catch(std::exception &se) {
......@@ -58,7 +58,7 @@ int main(const int argc, char *const *const argv) {
// and errorMessage has been set accordingly
std::cerr << "Aborting: " << errorMessage << std::endl;
if(userError) {
if(cmdLineNotParsed) {
std::cerr << std::endl;
catalogue::CreateAdminUserCmdLineArgs::printUsage(std::cerr);
}
......
......@@ -38,14 +38,14 @@ static int exceptionThrowingMain(const int argc, char *const *const argv);
int main(const int argc, char *const *const argv) {
using namespace cta;
bool userError = false;
bool cmdLineNotParsed = false;
std::string errorMessage;
try {
return exceptionThrowingMain(argc, argv);
} catch(exception::CommandLineNotParsed &ue) {
errorMessage = ue.getMessage().str();
userError = true;
cmdLineNotParsed = true;
} catch(exception::Exception &ex) {
errorMessage = ex.getMessage().str();
} catch(std::exception &se) {
......@@ -58,7 +58,7 @@ int main(const int argc, char *const *const argv) {
// and errorMessage has been set accordingly
std::cerr << "Aborting: " << errorMessage << std::endl;
if(userError) {
if(cmdLineNotParsed) {
std::cerr << std::endl;
catalogue::CreateSchemaCmdLineArgs::printUsage(std::cerr);
}
......
......@@ -38,14 +38,14 @@ static int exceptionThrowingMain(const int argc, char *const *const argv);
int main(const int argc, char *const *const argv) {
using namespace cta;
bool userError = false;
bool cmdLineNotParsed = false;
std::string errorMessage;
try {
return exceptionThrowingMain(argc, argv);
} catch(exception::CommandLineNotParsed &ue) {
errorMessage = ue.getMessage().str();
userError = true;
cmdLineNotParsed = true;
} catch(exception::Exception &ex) {
errorMessage = ex.getMessage().str();
} catch(std::exception &se) {
......@@ -58,7 +58,7 @@ int main(const int argc, char *const *const argv) {
// and errorMessage has been set accordingly
std::cerr << "Aborting: " << errorMessage << std::endl;
if(userError) {
if(cmdLineNotParsed) {
std::cerr << std::endl;
catalogue::DeleteAllCatalogueDataCmdLineArgs::printUsage(std::cerr);
}
......
......@@ -38,14 +38,14 @@ static int exceptionThrowingMain(const int argc, char *const *const argv);
int main(const int argc, char *const *const argv) {
using namespace cta;
bool userError = false;
bool cmdLineNotParsed = false;
std::string errorMessage;
try {
return exceptionThrowingMain(argc, argv);
} catch(exception::CommandLineNotParsed &ue) {
errorMessage = ue.getMessage().str();
userError = true;
cmdLineNotParsed = true;
} catch(exception::Exception &ex) {
errorMessage = ex.getMessage().str();
} catch(std::exception &se) {
......@@ -58,7 +58,7 @@ int main(const int argc, char *const *const argv) {
// and errorMessage has been set accordingly
std::cerr << "Aborting: " << errorMessage << std::endl;
if(userError) {
if(cmdLineNotParsed) {
std::cerr << std::endl;
catalogue::DropSchemaCmdLineArgs::printUsage(std::cerr);
}
......
......@@ -38,14 +38,14 @@ static int exceptionThrowingMain(const int argc, char *const *const argv);
int main(const int argc, char *const *const argv) {
using namespace cta;
bool userError = false;
bool cmdLineNotParsed = false;
std::string errorMessage;
try {
return exceptionThrowingMain(argc, argv);
} catch(exception::CommandLineNotParsed &ue) {
errorMessage = ue.getMessage().str();
userError = true;
cmdLineNotParsed = true;
} catch(exception::Exception &ex) {
errorMessage = ex.getMessage().str();
} catch(std::exception &se) {
......@@ -58,7 +58,7 @@ int main(const int argc, char *const *const argv) {
// and errorMessage has been set accordingly
std::cerr << "Aborting: " << errorMessage << std::endl;
if(userError) {
if(cmdLineNotParsed) {
std::cerr << std::endl;
catalogue::LockSchemaCmdLineArgs::printUsage(std::cerr);
}
......
......@@ -38,14 +38,14 @@ static int exceptionThrowingMain(const int argc, char *const *const argv);
int main(const int argc, char *const *const argv) {
using namespace cta;
bool userError = false;
bool cmdLineNotParsed = false;
std::string errorMessage;
try {
return exceptionThrowingMain(argc, argv);
} catch(exception::CommandLineNotParsed &ue) {
errorMessage = ue.getMessage().str();
userError = true;
cmdLineNotParsed = true;
} catch(exception::Exception &ex) {
errorMessage = ex.getMessage().str();
} catch(std::exception &se) {
......@@ -58,7 +58,7 @@ int main(const int argc, char *const *const argv) {
// and errorMessage has been set accordingly
std::cerr << "Aborting: " << errorMessage << std::endl;
if(userError) {
if(cmdLineNotParsed) {
std::cerr << std::endl;
catalogue::PollDatabaseCmdLineArgs::printUsage(std::cerr);
}
......
......@@ -38,14 +38,14 @@ static int exceptionThrowingMain(const int argc, char *const *const argv);
int main(const int argc, char *const *const argv) {
using namespace cta;
bool userError = false;
bool cmdLineNotParsed = false;
std::string errorMessage;
try {
return exceptionThrowingMain(argc, argv);
} catch(exception::CommandLineNotParsed &ue) {
errorMessage = ue.getMessage().str();
userError = true;
cmdLineNotParsed = true;
} catch(exception::Exception &ex) {
errorMessage = ex.getMessage().str();
} catch(std::exception &se) {
......@@ -58,7 +58,7 @@ int main(const int argc, char *const *const argv) {
// and errorMessage has been set accordingly
std::cerr << "Aborting: " << errorMessage << std::endl;
if(userError) {
if(cmdLineNotParsed) {
std::cerr << std::endl;
catalogue::SchemaStatusCmdLineArgs::printUsage(std::cerr);
}
......
......@@ -38,14 +38,14 @@ static int exceptionThrowingMain(const int argc, char *const *const argv);
int main(const int argc, char *const *const argv) {
using namespace cta;
bool userError = false;
bool cmdLineNotParsed = false;
std::string errorMessage;
try {
return exceptionThrowingMain(argc, argv);
} catch(exception::CommandLineNotParsed &ue) {
errorMessage = ue.getMessage().str();
userError = true;
cmdLineNotParsed = true;
} catch(exception::Exception &ex) {
errorMessage = ex.getMessage().str();
} catch(std::exception &se) {
......@@ -58,7 +58,7 @@ int main(const int argc, char *const *const argv) {
// and errorMessage has been set accordingly
std::cerr << "Aborting: " << errorMessage << std::endl;
if(userError) {
if(cmdLineNotParsed) {
std::cerr << std::endl;
catalogue::UnlockSchemaCmdLineArgs::printUsage(std::cerr);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment