yii2-errorhandler yii2 error handler With the ability to search on google, stackoverflow and display results in order to find a quick solution.

yii2 custom error handler

  1. Installation
  2. Usage

yii2 error handler With the ability to search on google, stackoverflow and yiiframework and display results in order to find a quick solution.

screenshot

Installation

The preferred way to install this extension is through composer.

Either run

composer require developit/yii2-errorhandler

or add

"developit/yii2-errorhandler": "*"

to the require section of your composer.json file.

Usage

create a action(eg. errorhandler)

    /**
     * @inheritdoc
     */
    public function actions()
    {
        return [
            'error' => [
                'class' => 'yii\web\ErrorAction',
            ],
            'errorhandler' => [
                'class' => 'developit\errorhandler\ErrorHandlerAction',
            ]
        ];
    }

update errorHandler on config.php

        'errorHandler' => [
            'class' => 'developit\errorhandler\ErrorHandler',
            'errorAction' => 'site/error',
        ],
0 0
1 follower
0 downloads
Yii Version: 2.0
License: GPL-3.0
Category: Error Handling
Developed by: mr.rezaee
Created on: Sep 15, 2017
Last updated: 7 years ago

Related Extensions