Development

Changeset 6982

You must first sign up to be able to contribute.

Changeset 6982

Show
Ignore:
Timestamp:
01/07/08 06:20:48 (11 months ago)
Author:
dwhittle
Message:

dwhittle: tweaked exceptions

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/dwhittle/1.1/lib/exception/sfError404Exception.class.php

    r6981 r6982  
    2020{ 
    2121  /** 
     22   * Forwards to the 404 action. 
    2223   * @see sfException 
    2324   */ 
    2425  public function asResponse() 
    2526  { 
    26     $exception = is_null($this->wrappedException) ? $this : $this->wrappedException; 
    27  
    2827    if (sfConfig::get('sf_debug')) 
    2928    { 
    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(); 
    3730      $response->setStatusCode(404); 
    38  
    39       return parent::printStackTrace(); 
    4031    } 
    4132    else 
     
    4940      $context = sfContext::getInstance(); 
    5041      $context->getController()->forward(sfConfig::get('sf_error_404_module'), sfConfig::get('sf_error_404_action')); 
    51  
    5242      $response = $context->getResponse(); 
    5343    } 
  • branches/dwhittle/1.1/lib/exception/sfStopException.class.php

    r6531 r6982  
    44 * This file is part of the symfony package. 
    55 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 
    6  *  
     6 * 
    77 * For the full copyright and license information, please view the LICENSE 
    88 * file that was distributed with this source code. 
  • branches/dwhittle/1.1/lib/util/sfContext.class.php

    r6981 r6982  
    5555    catch (sfException $e) 
    5656    { 
    57       $e->printStackTrace(); 
     57      $e->asResponse(); 
    5858    } 
    5959    catch (Exception $e)