Пример #1
0
 /**
  * Render detailed diagnostics for unhandled exceptions rescued from
  *  a controller action.
  */
 public function rescueActionLocally($Exception)
 {
     $exception_class_name = get_class($Exception);
     if (!isset($this->rescue_templates[$exception_class_name])) {
         AkError::handle($Exception);
     }
     AkConfig::rebaseApp(AK_ACTION_PACK_DIR . DS . 'rescues');
     $Template = new AkActionView();
     $Template->registerTemplateHandler('tpl', 'AkPhpTemplateHandler');
     $Template->Request = $this->Request;
     $file = $this->rescue_templates[$exception_class_name];
     $body = $Template->render(array('file' => $file, 'layout' => 'layouts/exception', 'locals' => array('Exception' => $Exception, 'Template' => $Template, 'Request' => $this->Request)));
     AkConfig::leaveBase();
     $this->render($this->getStatusCode($Exception), $body);
 }