taguz91/yii2-error-handler

Error handler for mongo databases


Keywords
extension, yii2, error-handler, mongodb, yii2-extension
License
Apache-2.0

Documentation

Error handler

Error handler for mongo database

Latest Stable Version Total Downloads Latest Unstable Version License

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