Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
],
],
]
```