Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taguz91/yii2-error-handler
Error handler for mongo databases
https://github.com/taguz91/yii2-error-handler
error-handler mongodb yii2 yii2-extension
Last synced: 15 days ago
JSON representation
Error handler for mongo databases
- Host: GitHub
- URL: https://github.com/taguz91/yii2-error-handler
- Owner: taguz91
- License: apache-2.0
- Created: 2021-04-02T23:13:45.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-09T23:24:32.000Z (about 2 years ago)
- Last Synced: 2024-12-14T01:23:01.898Z (26 days ago)
- Topics: error-handler, mongodb, yii2, yii2-extension
- Language: PHP
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Error handler
=============
Error handler for mongo database[![Latest Stable Version](https://poser.pugx.org/taguz91/yii2-error-handler/v)](//packagist.org/packages/taguz91/yii2-error-handler)
[![Total Downloads](https://poser.pugx.org/taguz91/yii2-error-handler/downloads)](//packagist.org/packages/taguz91/yii2-error-handler)
[![Latest Unstable Version](https://poser.pugx.org/taguz91/yii2-error-handler/v/unstable)](//packagist.org/packages/taguz91/yii2-error-handler)
[![License](https://poser.pugx.org/taguz91/yii2-error-handler/license)](//packagist.org/packages/taguz91/yii2-error-handler)Installation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
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:
```php
// 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
],
],
]
```