Revision: 169
http://sourceforge.net/p/beeframework/code/169
Author: m_plomer
Date: 2014-07-03 10:02:05 +0000 (Thu, 03 Jul 2014)
Log Message:
-----------
MVC SimpleMappingExceptionResolver: added logging
Modified Paths:
--------------
trunk/framework/Bee/MVC/SimpleMappingExceptionResolver.php
Modified: trunk/framework/Bee/MVC/SimpleMappingExceptionResolver.php
===================================================================
--- trunk/framework/Bee/MVC/SimpleMappingExceptionResolver.php 2014-07-03 09:13:10 UTC (rev 168)
+++ trunk/framework/Bee/MVC/SimpleMappingExceptionResolver.php 2014-07-03 10:02:05 UTC (rev 169)
@@ -21,6 +21,21 @@
const MODEL_HANDLER_EXCEPTION_KEY = 'handler_excpetion';
/**
+ * @var Logger
+ */
+ protected $log;
+
+ /**
+ * @return Logger
+ */
+ protected function getLog() {
+ if (!$this->log) {
+ $this->log = Logger::getLogger(get_class($this));
+ }
+ return $this->log;
+ }
+
+ /**
*
* @var array
*/
@@ -73,6 +88,7 @@
* @return Bee_MVC_ModelAndView|bool
*/
public function resolveException(Bee_MVC_IHttpRequest $request, IController $handler = null, Exception $ex) {
+ $this->getLog()->info('Trying to map exception', $ex);
$viewName = false;
@@ -95,8 +111,10 @@
if (!$viewName && Bee_Utils_Strings::hasText($this->defaultErrorView)) {
$viewName = $this->defaultErrorView;
+ $this->getLog()->debug('Resolving to default error view');
}
+ $this->getLog()->debug('Resolved error view: ' . $viewName);
return $viewName ? new Bee_MVC_ModelAndView(array(self::MODEL_HANDLER_EXCEPTION_KEY => $ex), $viewName) : false;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|