sitecontroller
public function actitonError(){ $exception = Yii::$app->errorHandler->exception; if ($exception !== null) { return $this->render('error', ['exception' => $exception]); } } public function actions() { $this->layout = false; return [ 'error' => [ 'class' => 'yii\web\ErrorAction', ], ]; }
views/site/error.php
<?php echo $name; echo "<br/>"; echo $message; echo "<br>"; echo $exception;