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!
#2

[eluser]InsiteFX[/eluser]
Why are you posting this in two topics?
#3

[eluser]xander9x[/eluser]
I tried to delete it, but can't find the Delete button Sad sorry.




Theme © iAndrew 2016 - Forum software by © MyBB