Commit 6d833600 authored by Steven Murray's avatar Steven Murray
Browse files

Missing command-line options now throw CommandLineNotParsed exception

parent 8cdf658d
......@@ -86,11 +86,11 @@ CreateAdminHostCmdLineArgs::CreateAdminHostCmdLineArgs(const int argc, char *con
}
if(adminHostname.empty()) {
throw exception::Exception("The hostname option must be specified with a non-empty string");
throw exception::CommandLineNotParsed("The hostname option must be specified with a non-empty string");
}
if(comment.empty()) {
throw exception::Exception("The comment option must be specified with a non-empty string");
throw exception::CommandLineNotParsed("The comment option must be specified with a non-empty string");
}
// Calculate the number of non-option ARGV-elements
......
......@@ -86,11 +86,11 @@ CreateAdminUserCmdLineArgs::CreateAdminUserCmdLineArgs(const int argc, char *con
}
if(adminUsername.empty()) {
throw exception::Exception("The username option must be specified with a non-empty string");
throw exception::CommandLineNotParsed("The username option must be specified with a non-empty string");
}
if(comment.empty()) {
throw exception::Exception("The comment option must be specified with a non-empty string");
throw exception::CommandLineNotParsed("The comment option must be specified with a non-empty string");
}
// Calculate the number of non-option ARGV-elements
......
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