Handles caught exceptions, uncaught exceptions and php errors in a single method.
- In your application enable hooks on application/config/config.php
$config['enable_hooks'] = TRUE - ATENTION: If you are using Hooks add content from dist/application/config/hooks.php to your file.
- Copy all files from dist folder to your project.
- Update config/custom_exception.php with your preferences.
- Access <your_app_url>/exception_tests to test.
- Run dist/sql/custom_exception.sql in your database. If you change table's name remember to update the config/custom_exception.php.
- Use try/catch on controllers
- Throw exceptions on models/helpers/libraries
- Check the tests controller for examples.
- Add threshold to PHP errors severity
Inspired by: http://thecancerus.com/simple-way-to-add-global-exception-handling-in-codeigniter/