[eluser]xander9x[/eluser]
Hi, I'm trying to extend the Exception but always receive Fatal error: Call to undefined function. I tried to add function to both the system/core and application/core/MY_Exceptions.php. Both failed.
Code:
class MY_Exceptions extends CI_Exceptions
{
// function __construct()
// {
// parent::__construct();
// }
public function foo()
{
echo 'foo';
}
Code:
class Users extends CI_Controller
{
public function index()
{
foo(); // not work
show_error('bar'); // works
Thanks!