2017 © Pedro Peláez
 

library raw-error-handler

RawErrorHandler is a simple error handler used by RawPHP framework and other PHP applications.

image

rawphp/raw-error-handler

RawErrorHandler is a simple error handler used by RawPHP framework and other PHP applications.

  • Thursday, December 18, 2014
  • by rawphp
  • Repository
  • 1 Watchers
  • 0 Stars
  • 234 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

RawErrorHandler - A Simple Error Handler Class for PHP Applications

Build Status Coverage Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Package Features

  • Setup error and exception handlers
  • Setup custom callbacks

Installation

Composer

RawErrorHandler is available via Composer/Packagist., (*2)

Add "rawphp/raw-error-handler": "0.*@dev" to the require block in your composer.json and then run composer install., (*3)

{
        "require": {
            "rawphp/raw-error-handler": "0.*@dev"
        }
}

You can also simply run the following from the command line:, (*4)

composer require rawphp/raw-error-handler "0.*@dev"

Tarball

Alternatively, just copy the contents of the RawErrorHandler folder into somewhere that's in your PHP include_path setting. If you don't speak git or just want a tarball, click the 'zip' button at the top of the page in GitHub., (*5)

Basic Usage

<?php

use RawPHP\RawErrorHandler\ErrorHandler;

// optional configuration
$config = array(
    'error_callback'     => array( $this, 'errorCallback' ),
    'exception_callback' => array( $this, 'exceptionCallback' ),
    'shutdown_callback'  => array( $this, 'shutdownCallback' ),
);

// instantiate error handler
$handler = new ErrorHandler( );

// config array is optional
$handler->init( $config );

// callbacks
public function errorCallback( $error )
{
    // handle the error trace
}

public function exceptionCallback( $exception )
{
    // handle the exception trace
}

public function shutdownCallback( )
{
    // do any required cleanup
}

License

This package is licensed under the MIT. Read LICENSE for information on the software availability and distribution., (*6)

Contributing

Please submit bug reports, suggestions and pull requests to the GitHub issue tracker., (*7)

Changelog

22-09-2014

  • Updated to PHP 5.3.

18-09-2014

  • Updated to work with the latest rawphp/rawbase package.

14-09-2014

  • Implemented the hook system.
  • Removed init() call from constructor.

12-09-2014

  • Initial Code Commit.

The Versions

18/12 2014

dev-master

9999999-dev http://rawphp.org

RawErrorHandler is a simple error handler used by RawPHP framework and other PHP applications.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Tom Kaczocha

exception error handler