taguz91 / yii2-error-handler
Error handler for mongo databases
Installs: 25 328
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.0.0
- mongodb/mongodb: ^1.8.0
- taguz91/yii2-common-helpers: ^2.0.0
- yiisoft/yii2: ~2.0.41
- yiisoft/yii2-mongodb: ^2.0
README
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 ], ], ]