Development

Changeset 6519

You must first sign up to be able to contribute.

Changeset 6519

Show
Ignore:
Timestamp:
12/16/07 08:32:29 (2 years ago)
Author:
fabien
Message:

added a log of all exception in the PHP log + fixed 404 page in production

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/exception/sfError404Exception.class.php

    r5139 r6519  
    2424  public function printStackTrace() 
    2525  { 
     26    // log all exceptions in php log 
     27    $exception = is_null($this->wrappedException) ? $this : $this->wrappedException; 
     28    error_log($exception->getMessage()); 
     29 
    2630    if (sfConfig::get('sf_debug')) 
    2731    { 
     
    3236    else 
    3337    { 
    34       sfContext::getInstance()->getController()->forward(sfConfig::get('sf_error_404_module'), sfConfig::get('sf_error_404_action')); 
     38      $context = sfContext::getInstance(); 
     39 
     40      $context->getController()->forward(sfConfig::get('sf_error_404_module'), sfConfig::get('sf_error_404_action')); 
     41      $context->getResponse()->send(); 
    3542    } 
    3643  } 
  • trunk/lib/exception/sfException.class.php

    r6518 r6519  
    5151  public function printStackTrace() 
    5252  { 
     53    $exception = is_null($this->wrappedException) ? $this : $this->wrappedException; 
     54 
     55    // log all exceptions in php log 
     56    error_log($exception->getMessage()); 
     57 
    5358    if (!sfConfig::get('sf_test')) 
    5459    { 
     
    6166    try 
    6267    { 
    63       $exception = is_null($this->wrappedException) ? $this : $this->wrappedException; 
    6468      $this->outputStackTrace($exception); 
    6569    } 
     
    7983  static protected function outputStackTrace($exception) 
    8084  { 
    81     // log all exceptions in php log 
    82     error_log($exception->getMessage()); 
    83  
    8485    if (class_exists('sfContext', false) && sfContext::hasInstance()) 
    8586    { 
  • trunk/lib/exception/sfStopException.class.php

    r5139 r6519  
    2424  public function printStackTrace() 
    2525  { 
     26    // log all exceptions in php log 
     27    $exception = is_null($this->wrappedException) ? $this : $this->wrappedException; 
     28    error_log($exception->getMessage()); 
    2629  } 
    2730} 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.