ErrorController: Log exception and stacktrace

refe #5896
This commit is contained in:
Marius Hein 2014-08-29 10:57:05 +02:00
parent 62f502d276
commit 751d2e6d11
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@
// namespace Icinga\Application\Controllers;
use Icinga\Logger\Logger;
use Icinga\Web\Controller\ActionController;
use Icinga\Application\Icinga;
@ -21,6 +22,10 @@ class ErrorController extends ActionController
{
$error = $this->_getParam('error_handler');
$exception = $error->exception;
Logger::error($exception);
Logger::error('Stacktrace: %s', $exception->getTraceAsString());
switch ($error->type) {
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER: