Changeset 6982
- Timestamp:
- 01/07/08 06:20:48 (11 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dwhittle/1.1/lib/exception/sfError404Exception.class.php
r6981 r6982 20 20 { 21 21 /** 22 * Forwards to the 404 action. 22 23 * @see sfException 23 24 */ 24 25 public function asResponse() 25 26 { 26 $exception = is_null($this->wrappedException) ? $this : $this->wrappedException;27 28 27 if (sfConfig::get('sf_debug')) 29 28 { 30 $response = sfContext::getInstance()->getResponse(); 31 if (is_null($response)) 32 { 33 $response = new sfWebResponse(sfContext::getInstance()->getEventDispatcher()); 34 sfContext::getInstance()->setResponse($response); 35 } 36 29 $response = parent::asResponse(); 37 30 $response->setStatusCode(404); 38 39 return parent::printStackTrace();40 31 } 41 32 else … … 49 40 $context = sfContext::getInstance(); 50 41 $context->getController()->forward(sfConfig::get('sf_error_404_module'), sfConfig::get('sf_error_404_action')); 51 52 42 $response = $context->getResponse(); 53 43 } branches/dwhittle/1.1/lib/exception/sfStopException.class.php
r6531 r6982 4 4 * This file is part of the symfony package. 5 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. branches/dwhittle/1.1/lib/util/sfContext.class.php
r6981 r6982 55 55 catch (sfException $e) 56 56 { 57 $e-> printStackTrace();57 $e->asResponse(); 58 58 } 59 59 catch (Exception $e)