![]() |
Exceptions.php - Intercepting echo - 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: Exceptions.php - Intercepting echo (/showthread.php?tid=15499) |
Exceptions.php - Intercepting echo - El Forum - 02-06-2009 [eluser]rvent[/eluser] Hello, I am having a little problem. I am using CodeIgniter with ExtJS and creating a login form. So far eveything works fine except when i get to the part in my library that does the "ldap_bind" and it is that the system/libraries/Exception.php says to Echo the $buffer last line in the code. Code: function show_php_error($severity, $message, $filepath, $line) So what i've been doing is returning Json strings with success=true and success=false so that my ExtJS code can display it on a popup window. Certaintly it works fine on other failures, but the echo kind of messes things up for me at the moment... Any idea on how to get rid of it..? Thanks. Exceptions.php - Intercepting echo - El Forum - 02-06-2009 [eluser]jtkendall[/eluser] Hi rvent, You can remove the echo by extending the Exceptions class. In your Application/Libraries folder create a MY_Exceptions.php file (provided you have your "subclass_prefix" still set to the default "MY_"), set the file up (see code below), modify the function to suit your needs, and that should work for you. Code: <?php |