2017 © Pedro Peláez
 

library exceptionist

Exception handler for PHP 5.3

image

softius/exceptionist

Exception handler for PHP 5.3

  • Wednesday, June 5, 2013
  • by softius
  • Repository
  • 2 Watchers
  • 3 Stars
  • 1,259 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

exceptionist

Exceptionist provides exception handler for PHP 5.3+. Based on the application environment you can choose to display a detailed error report with stack trace or a mini report just mentioning the exception occured., (*1)

Installation

Exceptionist is available on packagist. All you need is to add the following lines in your project composer.json:, (*2)

``` JSON { "require": { "softius/exceptionist": "0.1" } }, (*3)

and install via composer:

php composer.phar install

Then, you will need to setup `GenericExceptionHandler`. You are adviced to setup the following as early as possible in your script. ``` PHP set_exception_handler(array(new \Exceptionist\GenericExceptionHandler(array('project_root' => 'project_root_dir')), 'handle'));

Configuration

GenericExceptionHandler accepts a configuration array with the following options:, (*4)

  • project_root: defines the project root directory, default is null.
  • template_script: full path of the template to be used. The following built-in templates are available: \Exceptionist\ExceptionReporter::TEMPLATE_DETAILED
  • code_block_length: number of lines to be displayed in each code block, default is 10.

How it works

ExceptionHandler is using ExceptionReporter class to generate and display exception reports. This happens only and only if an exception is thrown and not caught within a try/catch block. Templates are available in templates which can be copied, modified and adjusted to your needs, if necessary., (*5)

The Versions

05/06 2013

dev-master

9999999-dev http://github.com/softius/exceptionist

Exception handler for PHP 5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

debug exceptions

05/06 2013

0.3

0.3.0.0 http://github.com/softius/exceptionist

Exception handler for PHP 5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

debug exceptions

01/03 2013

0.2

0.2.0.0 http://github.com/softius/exceptionist

Exception handler for PHP 5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

debug exceptions

25/02 2013

0.1

0.1.0.0 http://github.com/softius/exceptionist

Exception handler for PHP 5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

debug exceptions