2017 © Pedro Peláez
 

library niceexception

image

niceexception/niceexception

  • Sunday, January 6, 2013
  • by gsdev
  • Repository
  • 0 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

NiceException!

Requirements

-PHP 5.3.3+ (uses polyfills) -PHP 5.4+, (*1)

Using with ZF2

Since ZF2 has a try/catch around the Controller dispatch theres no method for NiceException to function.. however by attaching an event in the Module bootstrap you can rethrow the exception to restores PHP default behaviour, (*2)

getApplication()->getEventManager();

        // Restore PHPs default behaviour
        $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, function (MvcEvent $e) {
            throw $e->getParam('exception');
        });
    }
```

Configuration
---------------------
```php
 'development',

        /**
         * If you know your application will create a buffer you could
         * disable this to save abit of time
         */
        'obStart' => true,

        /**
         * Should NiceException register a shutdown function
         * to attempt to catch(fake catch) fatal errors
         */
        'register_shutdown_function' => true, // @todo  true,

        /**
         * Should NiceException set the errors as on (-1)
         */
        'error_reporting' => true,

        // Should NiceException set a error handler
        'set_error_handler' => true,
    ));

    $niceException->run();
?>

The Versions

06/01 2013

dev-master

9999999-dev

  Sources   Download

The Requires

  • php >=5.3.3