2017 © Pedro Peláez
 

yii-extension yii-ratchet-error-handler

image

metalguardian/yii-ratchet-error-handler

  • Tuesday, January 20, 2015
  • by MetalGuardian
  • Repository
  • 0 Watchers
  • 0 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Ratchet Error Handler

Error handler with handling php errors, exceptions,. fatal errors, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require metalguardian/yii-ratchet-error-handler "dev-master"

or add, (*4)

"metalguardian/yii-ratchet-error-handler": "dev-master"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your configuration file :, (*6)

array(
    'preload' => array(
        // ...
        'rollbar',
        // ...
    ),
    'components' => array(
        'rollbar' => array(
            'class' => '\metalguardian\rollbar\Component',
            'access_token' => 'ACCESS_TOKEN',
            'environment' => 'production',
            'included_errno' => E_ALL,
        ),
        'errorHandler' => array(
            'class' => '\metalguardian\rollbar\ErrorHandler',
            'ignoreException' => function ($exception) {
                /** @var \CHttpException $exception */
                // ignore 404 exceptions
                if ($exception instanceof \CHttpException && $exception->statusCode == 404) {
                    return true;
                }
                // ignore 403 exceptions
                if ($exception instanceof \CHttpException && $exception->statusCode == 403) {
                    return true;
                }
                // other ignores

                return false;
            },
        ),

        ),
    // ...
)

The Versions

20/01 2015

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Ivan Pushkin

logger extension yii error handler ratchet