/** * Forwards an error to Whoops. * @param CErrorEvent $event */ protected function handleError($event) { if (!YII_DEBUG) { parent::handleError($event); return; } $this->disableLogRoutes(); try { $this->whoops->handleError($event->code, $event->message, $event->file, $event->line); } catch (Exception $ex) { $this->handleException($ex); } }
/** * Forwards an error to Whoops. * @param CErrorEvent $event */ protected function handleError($event) { if ($this->beforeHandling($event)) { if ($this->isAjaxRequest()) { Yii::app()->displayError($event->code, $event->message, $event->file, $event->line); } elseif (!YII_DEBUG) { parent::render('error', $event); } else { try { $this->whoops->handleError($event->code, $event->message, $event->file, $event->line); } catch (\Exception $e) { $this->handleException($e); } } } }