We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a79f4f9 + 7e0eab3 commit 4fb27a4Copy full SHA for 4fb27a4
lib/icinga/scheduleddowntime.cpp
@@ -87,8 +87,15 @@ void ScheduledDowntime::Start(bool runtimeCreated)
87
void ScheduledDowntime::TimerProc()
88
{
89
for (const ScheduledDowntime::Ptr& sd : ConfigType::GetObjectsByType<ScheduledDowntime>()) {
90
- if (sd->IsActive() && !sd->IsPaused())
91
- sd->CreateNextDowntime();
+ if (sd->IsActive() && !sd->IsPaused()) {
+ try {
92
+ sd->CreateNextDowntime();
93
+ } catch (const std::exception& ex) {
94
+ Log(LogCritical, "ScheduledDowntime")
95
+ << "Exception occurred during creation of next downtime for scheduled downtime '"
96
+ << sd->GetName() << "': " << DiagnosticInformation(ex, false);
97
+ }
98
99
}
100
101
0 commit comments