Error handler
Error handler for mongo database
Installation
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist taguz91/yii2-error-handler
or add
"taguz91/yii2-error-handler": "~1.0.0"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by:
// confing\main.php
'components' => [
...,
'errorHandler' => [
'errorAction' => 'site/error',
'class' => \taguz91\ErrorHandler\ErrorHandler::class,
'empresa' => $_GET['empresa'] ?? 'undefined',
'saveError' => true,
'showTrace' => YII_DEBUG,
// This exceptions not be save into database
'exceptionsNotSave' => [
\taguz91\ErrorHandler\exceptions\MessageException::class
],
],
]