Welcome Guest, Not a member yet? Register   Sign In
Can not extends core Exception.php
#1

[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!


Messages In This Thread
Can not extends core Exception.php - by El Forum - 05-10-2012, 07:15 PM
Can not extends core Exception.php - by El Forum - 05-10-2012, 09:13 PM
Can not extends core Exception.php - by El Forum - 05-10-2012, 09:26 PM
Can not extends core Exception.php - by El Forum - 05-10-2012, 09:28 PM
Can not extends core Exception.php - by El Forum - 05-13-2012, 01:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB