[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/demos/blog/protected/Common/ -> BlogErrorHandler.php (source)

   1  <?php
   2  /**
   3   * BlogErrorHandler class file
   4   *
   5   * @author Qiang Xue <qiang.xue@gmail.com>
   6   * @link http://www.pradosoft.com/
   7   * @copyright Copyright &copy; 2006 PradoSoft
   8   * @license http://www.pradosoft.com/license/
   9   * @version $Id: BlogErrorHandler.php 1492 2006-11-06 15:22:08Z xue $
  10   */
  11  
  12  Prado::using('System.Exceptions.TErrorHandler');
  13  Prado::using('Application.Common.BlogException');
  14  
  15  /**
  16   * BlogErrorHandler class
  17   *
  18   * @author Qiang Xue <qiang.xue@gmail.com>
  19   * @link http://www.pradosoft.com/
  20   * @copyright Copyright &copy; 2006 PradoSoft
  21   * @license http://www.pradosoft.com/license/
  22   */
  23  class BlogErrorHandler extends TErrorHandler
  24  {
  25      /**
  26       * Displays error to the client user.
  27       * THttpException and errors happened when the application is in <b>Debug</b>
  28       * mode will be displayed to the client user.
  29       * @param integer response status code
  30       * @param Exception exception instance
  31       */
  32  	protected function handleExternalError($statusCode,$exception)
  33      {
  34          if($exception instanceof BlogException)
  35          {
  36              $message=$exception->getMessage();
  37              Prado::log($message,TLogger::ERROR,'BlogApplication');
  38              $message=urldecode($this->getApplication()->getSecurityManager()->hashData($message));
  39              $this->Response->redirect($this->Service->constructUrl('ErrorReport',array('msg'=>$message),false));
  40          }
  41          else
  42              parent::handleExternalError($statusCode,$exception);
  43      }
  44  }
  45  
  46  ?>


Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7