{"id":5036,"date":"2021-08-09T09:32:39","date_gmt":"2021-08-09T09:32:39","guid":{"rendered":"https:\/\/www.bearloga.space\/?page_id=5036"},"modified":"2021-08-09T09:32:40","modified_gmt":"2021-08-09T09:32:40","slug":"yii-obrabotka-oshibok","status":"publish","type":"page","link":"https:\/\/www.bearloga.space\/en\/yii-obrabotka-oshibok\/","title":{"rendered":"Yii \u2014 \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Yii \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0448\u0438\u0431\u043e\u043a.&nbsp;\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0448\u0438\u0431\u043e\u043a Yii \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0432\u0441\u0435 \u043d\u0435\u0444\u0430\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 PHP \u0432 \u043f\u043e\u0434\u0434\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0442\u043b\u043e\u0432\u0443 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/li><li>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c \u0441\u0442\u0435\u043a\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/li><li>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u043e\u0448\u0438\u0431\u043e\u043a.<\/li><li>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0427\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0448\u0438\u0431\u043e\u043a, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 YII_ENABLE_ERROR_HANDLER \u043a\u0430\u043a \u043b\u043e\u0436\u043d\u0443\u044e \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0432\u0432\u043e\u0434\u0430.&nbsp;\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0448\u0438\u0431\u043e\u043a \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 1<\/strong>&nbsp;\u2014 \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">return [\n   'components' =&gt; [\n      'errorHandler' =&gt; [\n         'maxSourceLines' =&gt; 10,\n      ],\n   ],\n];<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u0430\u044f \u0432\u044b\u0448\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0440\u0430\u0432\u043d\u044b\u043c 10. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0432\u0441\u0435 \u043d\u0435\u0444\u0430\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 PHP \u0432 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 2<\/strong>&nbsp;\u2014 \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043d\u043e\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e&nbsp;<strong>actionShowError ()<\/strong>&nbsp;\u0432 SiteController.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public function actionShowError() {\n   try {\n      5\/0;\n   } catch (ErrorException $e) {\n      Yii::warning(\"Ooops...division by zero.\");\n   }\n   \/\/ execution continues...\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 3<\/strong>&nbsp;\u2014 \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043f\u043e URL-\u0430\u0434\u0440\u0435\u0441\u0443&nbsp;<strong>http: \/\/ localhost: 8080 \/ index.php? R = site \/ show-error<\/strong>&nbsp;.&nbsp;\u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/coderlessons.com\/wp-content\/uploads\/2019\/07\/add_actionshowerror_method.png\" alt=\"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 actionShowError\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0447\u0442\u043e \u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u0435\u043d, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435&nbsp;<strong>\u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 yii \\ web \\ NotFoundHttpException<\/strong>&nbsp;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 4<\/strong>\u00a0\u2014 \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435\u00a0<strong>\u0444\u0443\u043d\u043a\u0446\u0438\u044e actionShowError ()<\/strong>\u00a0.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public function actionShowError() {\n   throw new NotFoundHttpException(\"Something unexpected happened\");\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 5<\/strong>&nbsp;\u2014 \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441&nbsp;<strong>http: \/\/ localhost: 8080 \/ index.php? R = site \/ show-error<\/strong>&nbsp;\u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435.&nbsp;\u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 HTTP.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/coderlessons.com\/wp-content\/uploads\/2019\/07\/modify_actionshowerror_method.png\" alt=\"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 actionShowError\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 YII_DEBUG \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 true, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0448\u0438\u0431\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c \u0441\u0442\u0435\u043a\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u0432.&nbsp;\u041a\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 false, \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435.&nbsp;\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u2014<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>@ yii \/ views \/ errorHandler \/ exception.php<\/strong>&nbsp;\u2014 \u0444\u0430\u0439\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/li><li><strong>@ yii \/ views \/ errorHandler \/ error.php<\/strong>&nbsp;\u2014 \u0444\u0430\u0439\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>@ yii \/ views \/ errorHandler \/ exception.php<\/strong>&nbsp;\u2014 \u0444\u0430\u0439\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>@ yii \/ views \/ errorHandler \/ error.php<\/strong>&nbsp;\u2014 \u0444\u0430\u0439\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e \u043e\u0448\u0438\u0431\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 6<\/strong>&nbsp;\u2014 \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435&nbsp;<strong>\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/strong>&nbsp;\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f&nbsp;<strong>errorHandler \u0432<\/strong>&nbsp;\u0444\u0430\u0439\u043b\u0435&nbsp;<strong>config \/ web.php<\/strong>&nbsp;.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\n   $params = require(__DIR__ . '\/params.php');\n   $config = [\n      'id' =&gt; 'basic',\n      'basePath' =&gt; dirname(__DIR__),\n      'bootstrap' =&gt; ['log'],\n      'components' =&gt; [\n         'request' =&gt; [\n            \/\/ !!! insert a secret key in the following (if it is empty) - this\n               \/\/is required by cookie validation\n            'cookieValidationKey' =&gt; 'ymoaYrebZHa8gURuolioHGlK8fLXCKjO',\n         ],\n         'cache' =&gt; [\n            'class' =&gt; 'yii\\caching\\FileCache',\n         ],\n         'user' =&gt; [\n            'identityClass' =&gt; 'app\\models\\User',\n            'enableAutoLogin' =&gt; true,\n         ],\n         <strong>'errorHandler' =&gt; [\n            'errorAction' =&gt; 'site\/error',\n         ],<\/strong>\n         \/\/other components...\n            'db' =&gt; require(__DIR__ . '\/db.php'),\n      ],\n      'modules' =&gt; [\n         'hello' =&gt; [\n            'class' =&gt; 'app\\modules\\hello\\Hello',\n         ],\n      ],\n      'params' =&gt; $params,\n   ];\n   if (YII_ENV_DEV) {\n      \/\/ configuration adjustments for 'dev' environment\n      $config['bootstrap'][] = 'debug';\n      $config['modules']['debug'] = [\n         'class' =&gt; 'yii\\debug\\Module',\n      ];\n      $config['bootstrap'][] = 'gii';\n      $config['modules']['gii'] = [\n         'class' =&gt; 'yii\\gii\\Module',\n      ];\n   }\n   return $config;\n?&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u0430\u044f \u0432\u044b\u0448\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435&nbsp;<strong>site \/ error<\/strong>&nbsp;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 7<\/strong>&nbsp;\u2014 \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u043c\u0435\u0442\u043e\u0434&nbsp;<strong>actions ()<\/strong>&nbsp;\u0432 SiteController.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public function actions() {\n   return [\n      'error' =&gt; [\n         'class' =&gt; 'yii\\web\\ErrorAction',\n      ],\n   ];\n}\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u043a\u043e\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438&nbsp;<strong>\u043e\u0448\u0438\u0431\u043a\u0438<\/strong>&nbsp;\u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 8<\/strong>&nbsp;\u2014 \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c&nbsp;<strong>error.php \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435<\/strong>&nbsp;views \/ site.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\n   \/* @var $this yii\\web\\View *\/\n   \/* @var $name string *\/\n   \/* @var $message string *\/\n   \/* @var $exception Exception *\/\n   use yii\\helpers\\Html;\n   $this-&gt;title = $name;\n?&gt;\n\n&lt;div class = \"site-error\"&gt;\n   &lt;h2&gt;customized error&lt;\/h2&gt;\n   &lt;h1&gt;&lt;?= Html::encode($this-&gt;title) ?&gt;&lt;\/h1&gt;\n   \n   &lt;div class = \"alert alert-danger\"&gt;\n      &lt;?= nl2br(Html::encode($message)) ?&gt;\n   &lt;\/div&gt;\n   \n   &lt;p&gt;\n      The above error occurred while the Web server was processing your request.\n   &lt;\/p&gt;\n   \n   &lt;p&gt;\n      Please contact us if you think this is a server error. Thank you.\n   &lt;\/p&gt;\n&lt;\/div&gt;\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 9<\/strong>&nbsp;\u2014 \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443&nbsp;<strong>http: \/\/ localhost: 8080 \/ index.php? R = site \/ show-error<\/strong>&nbsp;, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432\u0438\u0434 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yii \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0448\u0438\u0431\u043e\u043a.&nbsp;\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0448\u0438\u0431\u043e\u043a Yii \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0432\u0441\u0435 \u043d\u0435\u0444\u0430\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 PHP \u0432 \u043f\u043e\u0434\u0434\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0442\u043b\u043e\u0432\u0443 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0432\u0441\u0435 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[156],"tags":[],"class_list":["post-5036","page","type-page","status-publish","hentry","category-yii"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/pages\/5036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/comments?post=5036"}],"version-history":[{"count":1,"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/pages\/5036\/revisions"}],"predecessor-version":[{"id":5037,"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/pages\/5036\/revisions\/5037"}],"wp:attachment":[{"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/media?parent=5036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/categories?post=5036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/tags?post=5036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}