int
StatCmds::statLease4GetHandler(CalloutHandle& handle) {
- LeaseStatCmdsImpl impl;
- MultiThreadingCriticalSection sc;
- return(impl.statLease4GetHandler(handle));
+ try {
+ LeaseStatCmdsImpl impl;
+ MultiThreadingCriticalSection sc;
+ return (impl.statLease4GetHandler(handle));
+ } catch (const std::exception& ex) {
+
+ LOG_ERROR(stat_cmds_logger, STAT_CMDS_LEASE4_FAILED)
+ .arg(ex.what());
+ }
+ return (1);
}
int
StatCmds::statLease6GetHandler(CalloutHandle& handle) {
- LeaseStatCmdsImpl impl;
- MultiThreadingCriticalSection sc;
- return(impl.statLease6GetHandler(handle));
+ try {
+ LeaseStatCmdsImpl impl;
+ MultiThreadingCriticalSection sc;
+ return (impl.statLease6GetHandler(handle));
+ } catch (const std::exception& ex) {
+
+ LOG_ERROR(stat_cmds_logger, STAT_CMDS_LEASE6_FAILED)
+ .arg(ex.what());
+ }
+ return (1);
}
};
extern const isc::log::MessageID STAT_CMDS_DEINIT_OK = "STAT_CMDS_DEINIT_OK";
extern const isc::log::MessageID STAT_CMDS_INIT_FAILED = "STAT_CMDS_INIT_FAILED";
extern const isc::log::MessageID STAT_CMDS_INIT_OK = "STAT_CMDS_INIT_OK";
+extern const isc::log::MessageID STAT_CMDS_LEASE4_FAILED = "STAT_CMDS_LEASE4_FAILED";
extern const isc::log::MessageID STAT_CMDS_LEASE4_GET = "STAT_CMDS_LEASE4_GET";
extern const isc::log::MessageID STAT_CMDS_LEASE4_GET_FAILED = "STAT_CMDS_LEASE4_GET_FAILED";
extern const isc::log::MessageID STAT_CMDS_LEASE4_GET_INVALID = "STAT_CMDS_LEASE4_GET_INVALID";
extern const isc::log::MessageID STAT_CMDS_LEASE4_GET_NO_SUBNETS = "STAT_CMDS_LEASE4_GET_NO_SUBNETS";
+extern const isc::log::MessageID STAT_CMDS_LEASE6_FAILED = "STAT_CMDS_LEASE6_FAILED";
extern const isc::log::MessageID STAT_CMDS_LEASE6_GET = "STAT_CMDS_LEASE6_GET";
extern const isc::log::MessageID STAT_CMDS_LEASE6_GET_FAILED = "STAT_CMDS_LEASE6_GET_FAILED";
extern const isc::log::MessageID STAT_CMDS_LEASE6_GET_INVALID = "STAT_CMDS_LEASE6_GET_INVALID";
"STAT_CMDS_DEINIT_OK", "unloading Stat Commands hooks library successful",
"STAT_CMDS_INIT_FAILED", "loading Stat Commands hooks library failed: %1",
"STAT_CMDS_INIT_OK", "loading Stat Commands hooks library successful",
+ "STAT_CMDS_LEASE4_FAILED", "stat-lease4-get command failed: reason: %1",
"STAT_CMDS_LEASE4_GET", "stat-lease4-get command successful, parameters: %1 rows found: %2",
"STAT_CMDS_LEASE4_GET_FAILED", "stat-lease4-get command failed: parameters: %1, reason: %2",
"STAT_CMDS_LEASE4_GET_INVALID", "stat-lease4-get command is malformed or invalid, reason: %1",
"STAT_CMDS_LEASE4_GET_NO_SUBNETS", "stat-lease4-get, parameters: %1, %2\"",
+ "STAT_CMDS_LEASE6_FAILED", "stat-lease6-get command failed: reason: %1",
"STAT_CMDS_LEASE6_GET", "stat-lease6-get command successful, parameters: %1 rows found: %2",
- "STAT_CMDS_LEASE6_GET_FAILED", "stat-lease4-get command failed: parameters: %1, reason: %2",
+ "STAT_CMDS_LEASE6_GET_FAILED", "stat-lease6-get command failed: parameters: %1, reason: %2",
"STAT_CMDS_LEASE6_GET_INVALID", "stat-lease6-get command is malformed or invalid, reason: %1",
"STAT_CMDS_LEASE6_GET_NO_SUBNETS", "stat-lease6-get, parameters: %1, %2\"",
NULL
extern const isc::log::MessageID STAT_CMDS_DEINIT_OK;
extern const isc::log::MessageID STAT_CMDS_INIT_FAILED;
extern const isc::log::MessageID STAT_CMDS_INIT_OK;
+extern const isc::log::MessageID STAT_CMDS_LEASE4_FAILED;
extern const isc::log::MessageID STAT_CMDS_LEASE4_GET;
extern const isc::log::MessageID STAT_CMDS_LEASE4_GET_FAILED;
extern const isc::log::MessageID STAT_CMDS_LEASE4_GET_INVALID;
extern const isc::log::MessageID STAT_CMDS_LEASE4_GET_NO_SUBNETS;
+extern const isc::log::MessageID STAT_CMDS_LEASE6_FAILED;
extern const isc::log::MessageID STAT_CMDS_LEASE6_GET;
extern const isc::log::MessageID STAT_CMDS_LEASE6_GET_FAILED;
extern const isc::log::MessageID STAT_CMDS_LEASE6_GET_INVALID;
The stat-lease4-get command has failed. Both the parameters supplied and
the reason for failure are logged.
+% STAT_CMDS_LEASE4_FAILED stat-lease4-get command failed: reason: %1
+The stat-lease4-get command has failed. The reason for failure is logged.
+
% STAT_CMDS_LEASE4_GET_INVALID stat-lease4-get command is malformed or invalid, reason: %1
The stat-lease4-get command was either malformed or contained invalid
parameters. A detailed explanation should be logged.
The stat-lease6-get command has been successful. The log will contain
the parameters supplied and the number of rows found.
-% STAT_CMDS_LEASE6_GET_FAILED stat-lease4-get command failed: parameters: %1, reason: %2
+% STAT_CMDS_LEASE6_GET_FAILED stat-lease6-get command failed: parameters: %1, reason: %2
The stat-lease6-get command has failed. Both the parameters supplied and
the reason for failure are logged.
+% STAT_CMDS_LEASE6_FAILED stat-lease6-get command failed: reason: %1
+The stat-lease6-get command has failed. The reason for failure is logged.
+
% STAT_CMDS_LEASE6_GET_INVALID stat-lease6-get command is malformed or invalid, reason: %1
The stat-lease6-get command was either malformed or contained invalid
parameters. A detailed explanation should be logged.