CodeIgniter Forums
Exception/error handling - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Exception/error handling (/showthread.php?tid=56546)



Exception/error handling - El Forum - 12-30-2012

[eluser]jprateragg[/eluser]
I'm in the process of converting my current PHP application to a CI application. I have a custom exception handling class that extends PHP's Exception class. How would I implement this in CI? I read the documentation on CI's core error handling class--would extending this class be best? Would I still use try/catch/throw the same as a regular PHP application? Or should I create a helper and use get_instance to get CI core functionality so I can access the function procedural style? Just curious as to how other people handle this. Thanks!