[icinga-checkins] icinga.org: icingaweb2-module-director/master: ServiceController: ignore command lookup errors

git at icinga.org git at icinga.org
Mon Nov 21 22:45:07 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: 065205dc7a95e404ba102627eeaed69743d07e2c
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=065205dc7a95e404ba102627eeaed69743d07e2c

Author: Thomas Gelf <thomas at gelf.net>
Date:   Fri Nov 18 19:54:47 2016 +0100

ServiceController: ignore command lookup errors

They can happen when an invalid command has been chosen

---

 application/controllers/ServiceController.php |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/application/controllers/ServiceController.php b/application/controllers/ServiceController.php
index c53ac8b..e4ec4af 100644
--- a/application/controllers/ServiceController.php
+++ b/application/controllers/ServiceController.php
@@ -2,7 +2,7 @@
 
 namespace Icinga\Module\Director\Controllers;
 
-use Icinga\Module\Director\Exception\NestingError;
+use Exception;
 use Icinga\Module\Director\Web\Controller\ObjectController;
 use Icinga\Module\Director\Objects\IcingaServiceSet;
 use Icinga\Module\Director\Objects\IcingaService;
@@ -143,8 +143,8 @@ class ServiceController extends ObjectController
                     array('class'    => 'icon-plus')
                 );
             }
-        } catch (NestingError $nestingError) {
-            // ignore the error for the form
+        } catch (Exception $e) {
+            // ignore the error, show no apply link
         }
     }
 



More information about the icinga-checkins mailing list