mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
ConfigHealthItemRenderer: be fail-safe
Icinga Web 2 should catch errors, but seems that it doesn't
This commit is contained in:
parent
a95618f283
commit
ea8452d0e9
@ -22,7 +22,14 @@ class ConfigHealthItemRenderer extends BadgeNavigationItemRenderer
|
|||||||
|
|
||||||
protected function hasProblems()
|
protected function hasProblems()
|
||||||
{
|
{
|
||||||
$this->checkHealth();
|
try {
|
||||||
|
$this->checkHealth();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->directorState = self::STATE_UNKNOWN;
|
||||||
|
$this->count = 1;
|
||||||
|
$this->message = $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
return $this->count > 0;
|
return $this->count > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user