![]() |
Struggling with extending CI_Exceptions - 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: Struggling with extending CI_Exceptions (/showthread.php?tid=30902) |
Struggling with extending CI_Exceptions - El Forum - 05-30-2010 [eluser]Unknown[/eluser] I recently started developing with CodeIgniter and it has been a great help for me. But at the moment I'm struggling with handling my errors/exceptions and so I needed to extended the base CI_Exceptions class. I have done something similar with the core Controller and it worked very good. So I did the same: - I created inside application/libraries a class with my prefix (CL_) : CL_Exceptions - The class extends from CI_Exceptions - I added some code for doing stack traces and e-mailing But none of the functionality gets overridden. The class is autoloaded: I can see if deliberately add some erroneous code. What might be the problem? Here is the class: Code: <?php Struggling with extending CI_Exceptions - El Forum - 07-02-2010 [eluser]Cambo[/eluser] Hi I also am having trouble extending the exceptions class. Possibly the problem with your code is that you have said the parent is the construct instead of the original class. Code: public function __construct() I think it should be: Code: public function __construct() Cambo Struggling with extending CI_Exceptions - El Forum - 05-12-2011 [eluser]Rushino[/eluser] got the same problem and i can't find a solution. |