コード例 #1
0
ファイル: Redirect.php プロジェクト: thedollarsign/easyii
 public function handleException($exception)
 {
     $redirectModel = SeoRedirects::find()->where(['old_url' => Yii::$app->request->url])->asArray()->one();
     if (!empty($redirectModel)) {
         $redirectStatus = $redirectModel['status'] == 302 ? 302 : 301;
         header("Location: " . $redirectModel['new_url'], true, $redirectStatus);
         exit;
     }
     parent::handleException($exception);
 }
コード例 #2
0
ファイル: Sentry.php プロジェクト: jerryhsia/yii2-plugins
 public function handleException($exception)
 {
     $this->captureException($exception);
     parent::handleException($exception);
 }
コード例 #3
0
 /**
  * Handle Exception
  * @param \Exception $exception
  */
 public function handleException($exception)
 {
     $this->reportException($exception);
     parent::handleException($exception);
 }