taguz91 / yii2-error-handler
Error handler for mongo databases
Package info
github.com/taguz91/yii2-error-handler
Type:yii2-extension
pkg:composer/taguz91/yii2-error-handler
v2.2.0
2022-09-09 15:04 UTC
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
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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 ], ], ]