Development

/branches/1.0/lib/exception/sfError404Exception.class.php

You must first sign up to be able to contribute.

root/branches/1.0/lib/exception/sfError404Exception.class.php

Revision 3243, 1.1 kB (checked in by fabien, 8 years ago)

updated lib/exception directory phpdoc

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Rev Date
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * sfError404Exception is thrown when a 404 error occurs in an action.
13  *
14  * @package    symfony
15  * @subpackage exception
16  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
17  * @version    SVN: $Id$
18  */
19 class sfError404Exception extends sfException
20 {
21   /**
22    * Class constructor.
23    *
24    * @param string The error message
25    * @param int    The error code
26    */
27   public function __construct($message = null, $code = 0)
28   {
29     $this->setName('sfError404Exception');
30     parent::__construct($message, $code);
31   }
32
33   /**
34    * Forwards to the 404 action.
35    *
36    * @param Exception An Exception implementation instance
37    */
38   public function printStackTrace($exception = null)
39   {
40     sfContext::getInstance()->getController()->forward(sfConfig::get('sf_error_404_module'), sfConfig::get('sf_error_404_action'));
41   }
42 }
43
Note: See TracBrowser for help on using the browser.