mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
Modules: Catch and log register.php exceptions
This commit is contained in:
parent
4608984403
commit
077c2a078e
@ -29,11 +29,12 @@
|
|||||||
namespace Icinga\Application\Modules;
|
namespace Icinga\Application\Modules;
|
||||||
|
|
||||||
use \Exception;
|
use \Exception;
|
||||||
use \Icinga\Application\ApplicationBootstrap;
|
|
||||||
use \Icinga\Application\Config;
|
|
||||||
use \Icinga\Application\Icinga;
|
|
||||||
use \Icinga\Web\Hook;
|
|
||||||
use \Zend_Controller_Router_Route as Route;
|
use \Zend_Controller_Router_Route as Route;
|
||||||
|
use Icinga\Application\ApplicationBootstrap;
|
||||||
|
use Icinga\Application\Config;
|
||||||
|
use Icinga\Application\Icinga;
|
||||||
|
use Icinga\Application\Logger;
|
||||||
|
use Icinga\Web\Hook;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module handling
|
* Module handling
|
||||||
@ -138,6 +139,12 @@ class Module
|
|||||||
try {
|
try {
|
||||||
$this->runRegisterScript();
|
$this->runRegisterScript();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
Logger::warn(
|
||||||
|
'Running the register script %s for module %s failed with the following exception: %s',
|
||||||
|
$this->registerscript,
|
||||||
|
$this->name,
|
||||||
|
$e->getMessage()
|
||||||
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user