EllisLab/CodeIgniter — pull request #1849 by dionysiosarvanitis (2012-10-04 10:25:17+00:00)
Title: Ability to pass control of caught errors and exceptions to a controller

To make this possible, a custom CIRuntimeException (similar to CI's error handling logic) can be thrown from within show_error function. By setting also a default exception_handler, catching the CIRuntimeException is not mandatory.

Everything works just like before plus we've added the ability to handle the error from within our controller.