Ability to pass control of caught errors and exceptions to a controller #1849

wants to merge 8 commits into


None yet
2 participants

dionysiosarvanitis commented Oct 4, 2012

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.


dchill42 commented Oct 4, 2012

If I understand correctly, I don't think the guys at Ellis are especially fond of throwing exceptions. I believe there is a philosophical reason why CodeIgniter doesn't contain any.

On the bright(?) side, what I think you're trying to achieve here can be accomplished without throwing an actual exception. #1818 offers (amidst various features) error overrides which let you configure a Controller method to handle general, 404, and php errors any way you like.


dionysiosarvanitis commented Oct 12, 2012

Yes, I know that (#!)
I'm gonna try your suggestion. The hole branch seems very very interesting. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment