mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 21:45:37 +00:00
[#2960] removed useless try catch
This commit is contained in:
@@ -75,15 +75,12 @@ CtrlDhcp4Hooks Hooks;
|
|||||||
///
|
///
|
||||||
/// @param signo Signal number received.
|
/// @param signo Signal number received.
|
||||||
void signalHandler(int signo) {
|
void signalHandler(int signo) {
|
||||||
try {
|
|
||||||
// SIGHUP signals a request to reconfigure the server.
|
// SIGHUP signals a request to reconfigure the server.
|
||||||
if (signo == SIGHUP) {
|
if (signo == SIGHUP) {
|
||||||
CommandMgr::instance().processCommand(createCommand("config-reload"));
|
CommandMgr::instance().processCommand(createCommand("config-reload"));
|
||||||
} else if ((signo == SIGTERM) || (signo == SIGINT)) {
|
} else if ((signo == SIGTERM) || (signo == SIGINT)) {
|
||||||
CommandMgr::instance().processCommand(createCommand("shutdown"));
|
CommandMgr::instance().processCommand(createCommand("shutdown"));
|
||||||
}
|
}
|
||||||
} catch (const isc::Exception& ex) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -159,13 +156,7 @@ ControlledDhcpv4Srv::loadConfigFile(const std::string& file_name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use parsed JSON structures to configure the server
|
// Use parsed JSON structures to configure the server
|
||||||
try {
|
|
||||||
result = CommandMgr::instance().processCommand(createCommand("config-set", json));
|
result = CommandMgr::instance().processCommand(createCommand("config-set", json));
|
||||||
} catch (const isc::Exception& ex) {
|
|
||||||
result = isc::config::createAnswer(CONTROL_RESULT_ERROR, string("Error while processing command "
|
|
||||||
"'config-set': ") + ex.what() +
|
|
||||||
", params: '" + json->str() + "'");
|
|
||||||
}
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
// Undetermined status of the configuration. This should never
|
// Undetermined status of the configuration. This should never
|
||||||
// happen, but as the configureDhcp4Server returns a pointer, it is
|
// happen, but as the configureDhcp4Server returns a pointer, it is
|
||||||
|
@@ -78,15 +78,12 @@ static const char* SERVER_DUID_FILE = "kea-dhcp6-serverid";
|
|||||||
///
|
///
|
||||||
/// @param signo Signal number received.
|
/// @param signo Signal number received.
|
||||||
void signalHandler(int signo) {
|
void signalHandler(int signo) {
|
||||||
try {
|
|
||||||
// SIGHUP signals a request to reconfigure the server.
|
// SIGHUP signals a request to reconfigure the server.
|
||||||
if (signo == SIGHUP) {
|
if (signo == SIGHUP) {
|
||||||
CommandMgr::instance().processCommand(createCommand("config-reload"));
|
CommandMgr::instance().processCommand(createCommand("config-reload"));
|
||||||
} else if ((signo == SIGTERM) || (signo == SIGINT)) {
|
} else if ((signo == SIGTERM) || (signo == SIGINT)) {
|
||||||
CommandMgr::instance().processCommand(createCommand("shutdown"));
|
CommandMgr::instance().processCommand(createCommand("shutdown"));
|
||||||
}
|
}
|
||||||
} catch (const isc::Exception& ex) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -162,13 +159,7 @@ ControlledDhcpv6Srv::loadConfigFile(const std::string& file_name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use parsed JSON structures to configure the server
|
// Use parsed JSON structures to configure the server
|
||||||
try {
|
|
||||||
result = CommandMgr::instance().processCommand(createCommand("config-set", json));
|
result = CommandMgr::instance().processCommand(createCommand("config-set", json));
|
||||||
} catch (const isc::Exception& ex) {
|
|
||||||
result = isc::config::createAnswer(CONTROL_RESULT_ERROR, string("Error while processing command "
|
|
||||||
"'config-set': ") + ex.what() +
|
|
||||||
", params: '" + json->str() + "'");
|
|
||||||
}
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
// Undetermined status of the configuration. This should never
|
// Undetermined status of the configuration. This should never
|
||||||
// happen, but as the configureDhcp6Server returns a pointer, it is
|
// happen, but as the configureDhcp6Server returns a pointer, it is
|
||||||
|
Reference in New Issue
Block a user