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

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.

class MY_Exceptions extends CI_Exceptions

//                        function __construct()
//                        {
//                                                parent::__construct();
//                        }

                        public function foo()
                                                echo 'foo';

class Users extends CI_Controller

                        public function index()
                                                foo(); // not work
                                                show_error('bar'); // works


Why are you posting this in two topics?

I tried to delete it, but can't find the Delete button Sad sorry.

Theme © iAndrew 2016 - Forum software by © MyBB