Commit 35860175 authored by Stephen Morris's avatar Stephen Morris

[master] Merge branch 'trac3459'

parents 4d7fa531 07228dd9
......@@ -100,7 +100,7 @@ void configure(const std::string& file_name) {
if (rcode != 0) {
string reason = "";
if (comment) {
reason = string(" (") + comment->stringValue() + string(")");
reason = comment->stringValue();
}
LOG_ERROR(dhcp4_logger, DHCP4_CONFIG_LOAD_FAIL).arg(reason);
isc_throw(isc::BadValue, "Failed to apply configuration: " << reason);
......
......@@ -97,6 +97,12 @@ main(int argc, char* argv[]) {
usage();
}
// Configuration file is required.
if (config_file.empty()) {
cerr << "Configuration file not specified." << endl;
usage();
}
int ret = EXIT_SUCCESS;
try {
......
......@@ -103,7 +103,7 @@ void configure(const std::string& file_name) {
if (rcode != 0) {
string reason = "";
if (comment) {
reason = string(" (") + comment->stringValue() + string(")");
reason = comment->stringValue();
}
LOG_ERROR(dhcp6_logger, DHCP6_CONFIG_LOAD_FAIL).arg(reason);
isc_throw(isc::BadValue, "Failed to apply configuration:" << reason);
......
......@@ -97,6 +97,12 @@ main(int argc, char* argv[]) {
usage();
}
// Configuration file is required.
if (config_file.empty()) {
cerr << "Configuration file not specified." << endl;
usage();
}
int ret = EXIT_SUCCESS;
try {
......
Markdown is supported
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